-
Notifications
You must be signed in to change notification settings - Fork 14
/
setup.py
62 lines (50 loc) · 2.13 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
import sys
import os
# We can't import version.py because only one "version" module can ever be
# loaded in a Python process, and multiple setup.py scripts may have to run in
# the same process.
exec(open(os.path.join(os.path.dirname(os.path.realpath(__file__)), "version.py")).read())
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
kwargs = dict(
name='toil-vg',
version=version,
description="UC Santa Cruz Computational Genomics Lab's Toil-based VG pipeline",
author='UCSC Computational Genomics Lab',
author_email='[email protected]',
url="https://github.com/BD2KGenomics/toil-vg",
python_requires='>=3.0',
install_requires=[x + y for x, y in required_versions.items()],
dependency_links=[],
tests_require=['pytest', 'numpy', 'scipy'],
package_dir={'': 'src'},
packages=find_packages('src'),
entry_points={
'console_scripts': ['toil-vg = toil_vg.vg_toil:main']}
)
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
# Sanitize command line arguments to avoid confusing Toil code attempting to parse them
sys.argv[1:] = []
errno = pytest.main(self.pytest_args.split())
sys.exit(errno)
kwargs['cmdclass'] = {'test': PyTest}
setup(**kwargs)
print("\n\n"
"Thank you for installing the UC Santa Cruz Computuational Genomics Lab VG DNA-seq pipeline! "
"If you want to run this Toil-based pipeline on a cluster in a cloud, please install Toil "
"with the appropriate extras. For example, To install AWS/EC2 support for example, run "
"\n\n"
"pip install \'toil[aws,mesos]>=3.6.0\'"
"\n\n"
"on every EC2 instance. Refer to Toil's documentation at http://toil.readthedocs.io/en/latest/installation.html "
"for more information.")