-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
86 lines (74 loc) · 2.39 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
"""
Setup for EzClermont
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
import re
# To use a consistent encoding
from codecs import open
from os import path
import sys
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
here = path.abspath(path.dirname(__file__))
VERSIONFILE = "cpcr/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
if sys.version_info <= (3, 0):
sys.stderr.write("ERROR: clermontpcr requires Python 3.5 " +
"or above...exiting.\n")
sys.exit(1)
## parse requirements file
install_reqs = list(parse_requirements("requirements.txt",
session=False))
try:
requirements = [str(ir.req) for ir in install_reqs]
except:
requirements = [str(ir.requirement) for ir in install_reqs]
setup(
name='ezclermont',
version=verstr,
description='ezclermont: phylotype your E. coli strains, in silico',
# long_description=long_description,
long_description="""
check out the GitHub
repo for the real README.md file
""",
url='https://github.com/nickp60/EzClermont',
# Author details
author='Nick Waters',
author_email='[email protected]',
license='MIT',
# handle requirments
install_requires=requirements,
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
keywords='bioinformatics evolution genomics development',
packages=find_packages(),
include_package_data=True,
package_data={
'': [path.join(__name__, "tests", "refs/*")],
},
entry_points={
'console_scripts': [
'ezclermont=cpcr.run:cli_main',
],
},
)