-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
72 lines (63 loc) · 2.52 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
# encoding: utf-8
# -----------------------------------------------------------------------------
# Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc.
# Distributed under the terms of the BSD License. See COPYING.rst.
# -----------------------------------------------------------------------------
import os
from setuptools import setup, find_packages
from distarray.__version__ import __version__
# let our mocks work on ReadTheDocs
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if on_rtd:
install_requires = []
else:
install_requires = [
'ipyparallel',
'numpy',
'mpi4py'
]
def parse_readme(filename='README.rst', sentinel="README"):
"""
Return file `filename` as a string.
Skips lines until it finds a comment that contains `sentinel` text. This
effectively strips off any badges or other undesirable content.
"""
with open(filename, 'r') as fp:
lines = fp.readlines()
for idx, line in enumerate(lines):
if line.startswith('..') and sentinel in line:
break
return "".join(lines[idx+1:])
if __name__ == "__main__":
metadata = {
'name': 'distarray',
'version': __version__,
'description': 'Distributed Memory Arrays for Python',
'keywords': 'parallel mpi distributed array',
'license': 'New BSD',
'author': 'IPython Development Team and Enthought, Inc.',
'maintainer': "DistArray Developers",
'maintainer_email': "[email protected]",
'url': 'https://github.com/enthought/distarray',
'packages': find_packages(),
'install_requires': install_requires,
'long_description': parse_readme(),
'platforms': ["Linux", "Mac OS-X"],
'entry_points': {'console_scripts': ['dacluster = '
'distarray.apps.dacluster:main']},
'classifiers': [c.strip() for c in """\
Development Status :: 3 - Alpha
Intended Audience :: Developers
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Operating System :: MacOS
Operating System :: OS Independent
Operating System :: POSIX
Operating System :: Unix
Programming Language :: Python
Topic :: Scientific/Engineering
Topic :: Software Development
Topic :: Software Development :: Libraries
""".splitlines() if len(c.strip()) > 0],
}
setup(**metadata)