forked from kmcos/kmcos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·135 lines (120 loc) · 4.43 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
#!/usr/bin/env python
"""Kinetic Monte Carlo of Systems"""
import os
#from distutils.core import setup
from kmcos import __version__ as version #Update this in __init__.py file of the main directory.
from setuptools import find_packages, Command, setup
maintainer = 'Aditya Savara'
url = 'https://github.com/kmcos/kmcos'
license = 'COPYING'
long_description = open('README.rst').read()
name='kmcos'
maintainer_email = 'AdityaSavara2008@u.northwestern.edu'
author = 'Max J. Hoffmann'
author_email = 'mjhoffmann@gmail.com'
description = __doc__
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: X11 Applications :: GTK',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Operating System :: POSIX :: Windows',
'Programming Language :: Fortran',
'Programming Language :: Python',
'Topic :: Education',
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Visualization',
]
requires = [
'numpy',
'ipython',
#'goocanvas', #part of pygobject now, I think.
'lxml',
'matplotlib',
# 'pygtk', #This is only for windows so should be under extras.
]
EXTRAS = {
'MINIMAL': ['ipython', 'numpy', 'lxml', 'ase', 'UnitTesterSG', 'CiteSoft'],# 'uncertainties': ['uncertainties'], #pymc...
'WINDOWS': ['ipython', 'numpy', 'lxml', 'ase', 'UnitTesterSG', 'CiteSoft', 'windows-curses'],# 'uncertainties': ['uncertainties'], #pymc...
'COMPLETE': ['ipython', 'numpy', 'lxml', 'ase', 'kiwi-gtk', 'dill', 'pycairo==1.11.1', 'pygobject==3.30', 'UnitTesterSG', 'CiteSoft', 'pytest', 'moviepy']# 'uncertainties': ['uncertainties'], #pymc...
}
packages = [
'kmcos',
'kmcos.utils',
'kmcos.run',
'kmcos.interactions',
'kmcos.gui',
]
package_dir = {'kmcos':'kmcos'}
package_data = {'kmcos':['fortran_src/*f90',
'fortran_src/*.mpy',
'kmc_editor.glade',
'fortran_src/assert.ppc',
'kmc_project_v0.1.dtd',
'kmc_project_v0.2.dtd',
'kmc_project_v0.3.dtd',
'kmc_project_v0.4.dtd']}
platforms = ['linux', 'windows']
if os.name == 'nt':
scripts = [
'tools/kmos.bat',
'tools/kmcos.bat'
]
else:
scripts = [
'tools/kmcos-build-standalone',
'tools/kmos',
'tools/kmcos',
'tools/kmcos-install-dependencies-ubuntu',
]
class UploadCommand(Command):
"""Support setup.py upload."""
description = 'Build and publish the package.'
user_options = []
@staticmethod
def status(s):
"""Prints things in bold."""
print('\033[1m{0}\033[0m'.format(s))
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
try:
self.status('Removing previous builds…')
rmtree(os.path.join(here, 'dist'))
except OSError:
pass
self.status('Building Source and Wheel (universal) distribution…')
os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))
self.status('Uploading the package to PyPI via Twine…')
os.system('twine upload dist/*')
self.status('Pushing git tags…')
os.system('git tag v{0}'.format(about['__version__']))
os.system('git push --tags')
sys.exit()
setup(
author=author,
author_email=author_email,
description=description,
license=license,
long_description=long_description,
maintainer=maintainer,
maintainer_email=maintainer_email,
name=name,
package_data=package_data,
package_dir=package_dir,
packages=packages,
platforms=platforms,
#requires=requires,
extras_require=EXTRAS,
scripts=scripts,
url=url,
version=version,
cmdclass={'upload': UploadCommand,}, #setup.py publish support
)