forked from LokiLuciferase/phenotrex
-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
71 lines (60 loc) · 2.18 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
#!/usr/bin/env python
import codecs
from os import path
import re
from setuptools import setup, find_namespace_packages
from pkg_resources import parse_requirements
# Single-sourcing the package version: Read from __init__
def read(*parts):
here = path.abspath(path.dirname(__file__))
with codecs.open(path.join(here, *parts), 'r') as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(
r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M
)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
with open('requirements/prod.txt') as prod_req:
requirements = [str(ir) for ir in parse_requirements(prod_req)]
with open('requirements/test.txt') as test_req:
test_requirements = [str(tr) for tr in parse_requirements(test_req)]
with open('requirements/extras.txt') as extra_req:
extra_requirements = [str(tr) for tr in parse_requirements(extra_req)]
setup(
author="Lukas Lüftinger",
author_email='[email protected]',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3.7',
],
description="Microbial Phenotype Prediction",
install_requires=requirements,
license="MIT license",
long_description=readme + '\n\n' + history,
long_description_content_type='text/x-rst',
include_package_data=True,
keywords='phenotrex',
name='phenotrex',
entry_points={'console_scripts': [
'phenotrex = phenotrex.cli.main:main',
], },
packages=find_namespace_packages(),
test_suite='tests',
tests_require=requirements + test_requirements,
extras_require={
'fasta': extra_requirements
},
url='https://github.com/univieCUBE/phenotrex',
version=find_version("phenotrex", "__init__.py"), # update there
zip_safe=False,
)