-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsetup.py
76 lines (66 loc) · 2.16 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
import os
import sys
import shutil
import re
import shutil
import platform
from glob import glob
from setuptools import setup, find_packages, Extension
from setuptools import Distribution, Command
from setuptools.command.install import install
import pkg_resources
__pkg_name__ = 'read_until'
__author__ = 'cwright'
__description__ = 'Read Until API'
__path__ = os.path.dirname(__file__)
__pkg_path__ = os.path.join(os.path.join(__path__, __pkg_name__))
# Get the version number from __init__.py
verstrline = open(os.path.join(__pkg_name__, '__init__.py'), 'r').read()
vsre = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(vsre, verstrline, re.M)
if mo:
__version__ = mo.group(1)
else:
raise RuntimeError('Unable to find version string in "{}/__init__.py".'.format(__pkg_name__))
# Get requirements from file, we prefer to have
# preinstalled these with pip to make use of wheels.
dir_path = os.path.dirname(__file__)
install_requires = []
with open(os.path.join(dir_path, 'requirements.txt')) as fh:
reqs = (
r.split('#')[0].strip()
for r in fh.read().splitlines() if not r.startswith('#')
)
for req in reqs:
if req == '':
continue
if req.startswith('git+https'):
req = req.split('/')[-1].split('@')[0]
install_requires.append(req)
extra_requires = {
'identification': ['scrappy', 'mappy']
}
extensions = []
setup(
name=__pkg_name__,
version=__version__,
url='https://github.com/nanoporetech/{}'.format(__pkg_name__),
author=__author__,
author_email='{}@nanoporetech.com'.format(__author__),
description=__description__,
dependency_links=[],
ext_modules=extensions,
install_requires=install_requires,
tests_require=[].extend(install_requires),
extras_require=extra_requires,
# don't include any testing subpackages in dist
packages=find_packages(exclude=['*.test', '*.test.*', 'test.*', 'test']),
package_data={},
zip_safe=False,
entry_points={
'console_scripts': [
'read_until_simple = {}.simple:main'.format(__pkg_name__),
'read_until_ident = {}.identification:main'.format(__pkg_name__)
]
},
)