-
Notifications
You must be signed in to change notification settings - Fork 15
/
setup.py
executable file
·74 lines (64 loc) · 2.92 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
import os
import re
from setuptools import find_packages
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
version = __import__('pbsmrtpipe').get_version()
_REQUIREMENTS_FILE = 'REQUIREMENTS.txt'
_README = 'README.md'
def _get_local_file(file_name):
return os.path.join(os.path.dirname(__file__), file_name)
def _get_description(file_name):
with open(file_name, 'r') as f:
_long_description = f.read()
return _long_description
def _get_requirements(file_name):
with open(file_name, 'r') as f:
lines = f.readlines()
rx = re.compile('^[A-z]')
requirements = [l for l in lines if rx.match(l) is not None]
if "READTHEDOCS" in os.environ:
requirements = [r for r in requirements if not "pbcore" in r]
return requirements
setup(
name='pbsmrtpipe',
version=version,
package_dir={'': '.'},
packages=find_packages('.'),
license='BSD',
author='mpkocher',
author_email='mkocher@pacificbiosciences.com',
description='PacBio workflow engine for scientific computing.',
setup_requires=['nose>=1.0'],
# Maybe the pbtools-* should really be done in a subparser style
entry_points={'console_scripts': ['pbsmrtpipe = pbsmrtpipe.cli:main',
'pbtools-runner = pbsmrtpipe.tools.runner:main',
'pbtestkit-runner = pbsmrtpipe.testkit.runner:main',
'pbtestkit-multirunner = pbsmrtpipe.testkit.multirunner:main',
'pbtools-report = pbsmrtpipe.tools.report_to_html:main',
'pbtestkit-service-runner = pbsmrtpipe.testkit.service_runner:main',
'pbtestkit-service-multirunner = pbsmrtpipe.testkit.service_multirunner:main'
]},
install_requires=_get_requirements(_get_local_file(_REQUIREMENTS_FILE)),
tests_require=['nose'],
long_description=_get_description(_get_local_file(_README)),
classifiers=['Development Status :: 4 - Beta'],
include_package_data=True,
zip_safe=False,
# I don't really understand the package_data semantics.
package_data={'pbsmrtpipe': ['cluster_templates/*/*.tmpl',
'chunk_operators/*.xml',
'schemas/*.avsc',
'registered_tool_contracts_sa3/*.json',
'registered_tool_contracts/*.json',
'html_templates/*.html',
'html_templates/*.css',
'html_templates/js/*.js',
'html_templates/css/*.css',
'tools/templates/*.tmpl',
'tests/data/*.xml',
'tests/data/*.json',
'tests/data/*.cfg']}
)