-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
70 lines (56 loc) · 2.01 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
# Copyright (C) 2015 UCSC Computational Genomics Lab
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
from setuptools import setup, find_packages
assert sys.version_info >= (2, 7)
from version import version
kwargs = dict(
name='s3am',
version=version,
author='Hannes Schmidt',
author_email='hannes@ucsc.edu',
url='https://github.com/BD2KGenomics/cgcloud',
description='Efficiently transfer large amounts of data to S3',
package_dir={ '': 'src' },
packages=find_packages( 'src' ),
entry_points={
'console_scripts': [
's3am = s3am.cli:try_main'
]
},
install_requires=[
'pycurl>=7.19.3',
'boto==2.38.0',
'bd2k-python-lib==1.14a1.dev37' ],
tests_require=[
'pytest==2.8.5',
'pyftpdlib==1.5.0' ] )
from setuptools.command.test import test as TestCommand
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 )
sys.exit( errno )
kwargs[ 'cmdclass' ] = { 'test': PyTest }
setup( **kwargs )