-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
50 lines (43 loc) · 1.74 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
"""
setup.py: Install nanoreactor learning script.
"""
VERSION=0.1
__author__ = "Lee-Ping Wang, Alexey Titov, Leah Bendavid, Robert McGibbon, Todd J. Martinez"
__version__ = "%.1f"%VERSION
import os, sys
from distutils.core import setup,Extension
import numpy
import glob
requirements = ['numpy', 'networkx']
def buildKeywordDictionary():
from distutils.core import Extension
setupKeywords = {}
setupKeywords["name"] = "learnreactions"
setupKeywords["version"] = "%.1f" %VERSION
setupKeywords["author"] = __author__
setupKeywords["author_email"] = "leeping@ucdavis.edu"
setupKeywords["license"] = "BSD 3-Clause"
setupKeywords["packages"] = ["learnreactions"]
setupKeywords["package_dir"] = {"learnreactions": "src"}
setupKeywords["scripts"] = glob.glob("bin/*.py") + glob.glob("bin/*.sh") + glob.glob("bin/*.exe")
setupKeywords["platforms"] = ["Linux"]
setupKeywords["description"] = "Identify reaction events in reactive MD simulations."
outputString=""
firstTab = 40
secondTab = 60
for key in sorted( setupKeywords.iterkeys() ):
value = setupKeywords[key]
outputString += key.rjust(firstTab) + str( value ).rjust(secondTab) + "\n"
print "%s" % outputString
return setupKeywords
def main():
setup_keywords = buildKeywordDictionary()
setup(**setup_keywords)
for requirement in requirements:
try:
exec('import %s' % requirement)
except ImportError as e:
print >> sys.stderr, '\nWarning: Could not import %s' % e
print >> sys.stderr, 'Warning: Some package functionality may not work'
if __name__ == '__main__':
main()