Fix setup.py to work without six installed.
Sadly setup_requires is evil, but what are we doing to do? Change-Id: I4c7ac659c73dc51cf213763a79c9b38e621a8d45
This commit is contained in:
@@ -19,8 +19,8 @@ matrix:
|
|||||||
env: JINJA_REQ="jinja2<2.7, Pygments<2.0"
|
env: JINJA_REQ="jinja2<2.7, Pygments<2.0"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install -q --use-mirrors fixtures extras python-mimeparse $JINJA_REQ sphinx unittest2
|
- pip install fixtures $JINJA_REQ sphinx
|
||||||
- python setup.py -q install
|
- python setup.py install
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- python -m testtools.run testtools.tests.test_suite
|
- python -m testtools.run testtools.tests.test_suite
|
||||||
|
|||||||
4
NEWS
4
NEWS
@@ -10,6 +10,10 @@ NEXT
|
|||||||
Changes
|
Changes
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
* Fixed our setup.py to use setup_requires to ensure the import dependencies
|
||||||
|
for testtools are present before setup.py runs (as setup.py imports testtools
|
||||||
|
to read out the version number). (Robert Collins)
|
||||||
|
|
||||||
* Support setUpClass skipping with self.skipException. Previously this worked
|
* Support setUpClass skipping with self.skipException. Previously this worked
|
||||||
with unittest from 2.7 and above but was not supported by testtools - it was
|
with unittest from 2.7 and above but was not supported by testtools - it was
|
||||||
a happy accident. Since we now hard depend on unittest2, we need to invert
|
a happy accident. Since we now hard depend on unittest2, we need to invert
|
||||||
|
|||||||
19
setup.py
19
setup.py
@@ -56,6 +56,16 @@ def get_long_description():
|
|||||||
os.path.dirname(__file__), 'doc/overview.rst')
|
os.path.dirname(__file__), 'doc/overview.rst')
|
||||||
return open(manual_path).read()
|
return open(manual_path).read()
|
||||||
|
|
||||||
|
# Since we import testtools in setup.py, our setup requirements are our install
|
||||||
|
# requirements.
|
||||||
|
deps = [
|
||||||
|
'extras',
|
||||||
|
# 'mimeparse' has not been uploaded by the maintainer with Python3 compat
|
||||||
|
# but someone kindly uploaded a fixed version as 'python-mimeparse'.
|
||||||
|
'python-mimeparse',
|
||||||
|
'unittest2>=0.8.0',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
setup(name='testtools',
|
setup(name='testtools',
|
||||||
author='Jonathan M. Lange',
|
author='Jonathan M. Lange',
|
||||||
@@ -77,11 +87,6 @@ setup(name='testtools',
|
|||||||
],
|
],
|
||||||
cmdclass=cmd_class,
|
cmdclass=cmd_class,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
install_requires=[
|
install_requires=deps,
|
||||||
'extras',
|
setup_requires=deps,
|
||||||
# 'mimeparse' has not been uploaded by the maintainer with Python3 compat
|
|
||||||
# but someone kindly uploaded a fixed version as 'python-mimeparse'.
|
|
||||||
'python-mimeparse',
|
|
||||||
'unittest2>=0.8.0',
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user