2424PACKAGE_DESC = 'Python client library for IBM Cloud Networking Services'
2525
2626with open ('requirements.txt' ) as f :
27- install_requires = [str (req ) for req in pkg_resources .parse_requirements (f )]
27+ install_requires = [
28+ str (req ) for req in pkg_resources .parse_requirements (f )
29+ ]
2830with open ('requirements-dev.txt' ) as f :
2931 tests_require = [str (req ) for req in pkg_resources .parse_requirements (f )]
3032
3840 os .system ('python setup.py sdist upload -r pypi' )
3941 sys .exit ()
4042
41- class PyTest (TestCommand ):
42- def finalize_options (self ):
43- TestCommand .finalize_options (self )
44- self .test_args = ['--strict' , '--verbose' , '--tb=long' , 'test' ]
45- self .test_suite = True
46-
47- def run_tests (self ):
48- import pytest
49- errcode = pytest .main (self .test_args )
50- sys .exit (errcode )
51-
52- class PyTestUnit (PyTest ):
53- def finalize_options (self ):
54- self .test_args = ['--strict' , '--verbose' , '--tb=long' , 'test/unit' ]
55-
56- class PyTestIntegration (PyTest ):
57- def finalize_options (self ):
58- self .test_args = ['--strict' , '--verbose' , '--tb=long' , 'test/integration' ]
59-
6043with open ("README.md" , "r" ) as fh :
6144 readme = fh .read ()
6245
63- setup (name = PACKAGE_NAME .replace ('_' , '-' ),
46+ setup (
47+ name = PACKAGE_NAME .replace ('_' , '-' ),
6448 version = __version__ ,
6549 description = PACKAGE_DESC ,
6650 license = 'Apache 2.0' ,
6751 install_requires = install_requires ,
6852 tests_require = tests_require ,
69- cmdclass = {'test' : PyTest , 'test_unit' : PyTestUnit , 'test_integration' : PyTestIntegration },
7053 author = 'IBM' ,
71547255 long_description = readme ,
@@ -89,5 +72,4 @@ def finalize_options(self):
8972 'Topic :: Software Development :: Libraries :: Python Modules' ,
9073 'Topic :: Software Development :: Libraries :: Application Frameworks' ,
9174 ],
92- zip_safe = True
93- )
75+ zip_safe = True )
0 commit comments