forked from saga-project/bliss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
165 lines (143 loc) · 5.04 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#!/usr/bin/env python
"""
Setup script.
"""
import os
import sys
import shutil
import fileinput
from distutils.core import setup
from distutils.command.install_data import install_data
from distutils.command.sdist import sdist
from bliss import version
scripts = [] # ["bin/bliss-run"]
import sys
if sys.hexversion < 0x02040000:
raise RuntimeError, "Bliss requires Python 2.4 or higher"
class our_install_data(install_data):
def finalize_options(self):
self.set_undefined_options('install',
('install_lib', 'install_dir'),
)
install_data.finalize_options(self)
def run(self):
install_data.run(self)
# ensure there's a bliss/VERSION file
fn = os.path.join(self.install_dir, 'bliss', 'VERSION')
open(fn, 'w').write(version)
self.outfiles.append(fn)
class our_sdist(sdist):
def make_release_tree(self, base_dir, files):
sdist.make_release_tree(self, base_dir, files)
# ensure there's a air/VERSION file
fn = os.path.join(base_dir, 'bliss', 'VERSION')
open(fn, 'w').write(version)
setup_args = {
'name': "bliss",
'version': version,
'description': "A native Python implementation of the OGF SAGA standard (GFD.90).",
'long_description': "Bliss (BLiss IS Saga) is a pragmatic and light-weight implementation of the OGF GFD.90 SAGA standard. Bliss is written 100% in Python and focuses on usability and ease of deployment rather than on feature completeness or blind standard obedience.",
'author': "Ole Christian Weidner, et al.",
'author_email': "[email protected]",
'maintainer': "Ole Christian Weidner",
'maintainer_email': "[email protected]",
'url': "http://saga-project.github.com/bliss/",
'license': "MIT",
'classifiers': [
'Development Status :: 4 - Beta',
'Environment :: No Input/Output (Daemon)',
'Intended Audience :: Developers',
'Programming Language :: Python',
'License :: OSI Approved :: MIT License',
'Topic :: System :: Distributed Computing',
'Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX',
'Operating System :: POSIX :: AIX',
'Operating System :: POSIX :: BSD',
'Operating System :: POSIX :: BSD :: BSD/OS',
'Operating System :: POSIX :: BSD :: FreeBSD',
'Operating System :: POSIX :: BSD :: NetBSD',
'Operating System :: POSIX :: BSD :: OpenBSD',
'Operating System :: POSIX :: GNU Hurd',
'Operating System :: POSIX :: HP-UX',
'Operating System :: POSIX :: IRIX',
'Operating System :: POSIX :: Linux',
'Operating System :: POSIX :: Other',
'Operating System :: POSIX :: SCO',
'Operating System :: POSIX :: SunOS/Solaris',
'Operating System :: Unix'
],
'packages': [
"bliss",
"bliss.saga",
"bliss.saga.job",
"bliss.saga.resource",
"bliss.saga.filesystem",
#"bliss.sagacompat",
#"bliss.sagacompat.sd",
#"bliss.sagacompat.job",
#"bliss.sagacompat.filesystem",
"bliss.runtime",
"bliss.interface",
"bliss.plugins",
"bliss.plugins.local",
"bliss.plugins.sge",
"bliss.plugins.pbs",
"bliss.plugins.sftp",
"bliss.plugins.ssh"
],
'scripts': scripts,
# mention data_files, even if empty, so install_data is called and
# VERSION gets copied
'data_files': [("bliss", [])],
'cmdclass': {
'install_data': our_install_data,
'sdist': our_sdist
}
}
# set zip_safe to false to force Windows installs to always unpack eggs
# into directories, which seems to work better --
# see http://buildbot.net/trac/ticket/907
if sys.platform == "win32":
setup_args['zip_safe'] = False
try:
# If setuptools is installed, then we'll add setuptools-specific arguments
# to the setup args.
import setuptools #@UnusedImport
except ImportError:
pass
else:
setup_args['install_requires'] = [
'openssh_wrapper',
'paramiko-on-pypi',
'furl'
]
if os.getenv('NO_INSTALL_REQS'):
setup_args['install_requires'] = None
##
## PROCESS SETUP OPTIONS FOR DIFFERENT BACKENDS
##
# process AIR_AMQP_HOSTNAME and AIR_AMQP_PORT
#air_amqp_hostname = os.getenv('AIR_AMQP_HOST')
#air_amqp_port = os.getenv('AIR_AMQP_PORT')
#
#if not air_amqp_hostname:
# air_amqp_hostname = "localhost"
#
#print "setting default amqp hostname to '%s' in air/scripts/config.py" % air_amqp_hostname
#
#if not air_amqp_port:
# air_amqp_port = "5672"
#
#print "setting default amqp port to '%s' in air/scripts/config.py" % air_amqp_port
#
#
#shutil.copyfile("./air/scripts/config.py.in", "./air/scripts/config.py")
#s = open("./air/scripts/config.py.in").read()
#s = s.replace('###REPLACE_WITH_AMQP_HOSTNAME###', str(air_amqp_hostname))
#s = s.replace('###REPLACE_WITH_AMQP_PORT###', str(air_amqp_port))
#f = open("./air/scripts/config.py", 'w')
#f.write(s)
#f.close()
setup(**setup_args)