This repository has been archived by the owner on Nov 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·81 lines (68 loc) · 2.26 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
"""SimGen
"""
from __future__ import print_function
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
#####################################
VERSION = "0.1.0"
ISRELEASED = False
if ISRELEASED:
__version__ = VERSION
else:
__version__ = VERSION + '.dev0'
#####################################
with open('simgen/version.py', 'w') as version_file:
version_file.write('version="{0}"\n'.format(__version__))
with open('__conda_version__.txt', 'w') as conda_version:
conda_version.write(__version__)
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errcode = pytest.main(['simgen'])
sys.exit(errcode)
with open('requirements.txt') as reqs_file:
reqs = [line.strip() for line in reqs_file]
setup(
name='simgen',
version=__version__,
description=__doc__.split('\n'),
long_description=__doc__,
author='Janos Sallai, Christoph Klein',
author_email='janos.sallai@vanderbilt.edu, christoph.klein@vanderbilt.edu',
url='https://github.com/imodels/simgen',
download_url='https://github.com/imodels/simgen/tarball/{}'.format(__version__),
packages=find_packages(),
package_dir={'simgen': 'simgen'},
include_package_data=True,
install_requires=reqs,
license="MIT",
zip_safe=False,
keywords='simgen',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License,'
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering :: Chemistry',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: Unix',
'Operating System :: MacOS',
],
test_suite='tests',
cmdclass={'test': PyTest},
extras_require={'utils': ['pytest']},
)