-
Notifications
You must be signed in to change notification settings - Fork 26
/
setup.py
70 lines (62 loc) · 2.18 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
from __future__ import print_function, absolute_import, division
import sys
import subprocess
from distutils.spawn import find_executable
from setuptools import setup, find_packages
from basesetup import write_version_py
VERSION = '1.2.0dev'
ISRELEASED = False
__version__ = VERSION
def main(**kwargs):
write_version_py(VERSION, ISRELEASED, 'osprey/version.py')
classifiers = """\
Development Status :: 3 - Alpha
Intended Audience :: Science/Research
License :: OSI Approved :: Apache Software License
Programming Language :: Python
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Operating System :: Unix
Operating System :: MacOS
Operating System :: Microsoft :: Windows
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Information Analysis"""
setup(
name='osprey',
author='Robert T. McGibbon',
author_email='[email protected]',
url='https://github.com/msmbuilder/osprey',
classifiers=[e.strip() for e in classifiers.splitlines()],
platforms=["Windows", "Linux", "Mac OS-X", "Unix"],
license='Apache Software License',
download_url='https://pypi.python.org/pypi/osprey/',
version=VERSION,
packages=find_packages(),
zip_safe=False,
package_data={'osprey': ['data/*']},
entry_points={
'console_scripts': [
'osprey = osprey.cli.main:main',
],
},
**kwargs
)
def readme_to_rst():
pandoc = find_executable('pandoc')
if pandoc is None:
raise RuntimeError("Turning the readme into a description requires "
"pandoc.")
long_description = subprocess.check_output(
[pandoc, 'README.md', '-t', 'rst'])
short_description = long_description.split('\n\n')[1]
return {
'description': short_description,
'long_description': long_description,
}
if __name__ == '__main__':
kwargs = {}
if any(e in sys.argv for e in ('upload', 'register', 'sdist')):
kwargs = readme_to_rst()
main(**kwargs)