-
Notifications
You must be signed in to change notification settings - Fork 17
/
setup.py
83 lines (71 loc) · 2.45 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
# -*- coding: utf-8 -*-
"""
MSMExplorer: Visualizations for statistical models of biomolecular dynamics
"""
import sys
import subprocess
from setuptools import setup, find_packages
from distutils.spawn import find_executable
try:
sys.dont_write_bytecode = True
sys.path.insert(0, '.')
from basesetup import write_version_py
finally:
sys.dont_write_bytecode = False
NAME = "msmexplorer"
VERSION = "1.2.0dev0"
ISRELEASED = False
__version__ = VERSION
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,
}
def main(**kwargs):
write_version_py(VERSION, ISRELEASED, 'msmexplorer/version.py')
setup(
name=NAME,
version=VERSION,
description=('Visualizations for statistical models'
'of biomolecular dynamics.'),
platforms=("Windows", "Linux", "Mac OS-X", "Unix",),
classifiers=(
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'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',
),
keywords=('visualizations', 'biomolecular', 'simulations',
'markov state models'),
author="Carlos Xavier Hernández",
author_email="[email protected]",
url='https://github.com/cxhernandez/%s' % NAME,
download_url='https://github.com/cxhernandez/%s/tarball/master' % NAME,
license='MIT',
packages=find_packages(),
include_package_data=True,
package_data={
NAME: ['README.md',
'requirements.txt'],
},
zip_safe=False,
**kwargs
)
if __name__ == '__main__':
kwargs = {}
if any(e in sys.argv for e in ('upload', 'register', 'sdist')):
kwargs = readme_to_rst()
main(**kwargs)