setup: require setuptools_trial >= 0.5, and delegate to it the job of deciding which Twisted reactor to use for the current platform
This commit is contained in:
parent
a6eb434b57
commit
e010d49835
12
setup.py
12
setup.py
|
@ -142,23 +142,13 @@ setup_requires = []
|
||||||
# tests (and in order to make sure Twisted is installed early enough -- see the paragraph
|
# tests (and in order to make sure Twisted is installed early enough -- see the paragraph
|
||||||
# above).
|
# above).
|
||||||
# http://pypi.python.org/pypi/setuptools_trial
|
# http://pypi.python.org/pypi/setuptools_trial
|
||||||
setup_requires.extend(['setuptools_trial'])
|
setup_requires.extend(['setuptools_trial >= 0.5'])
|
||||||
|
|
||||||
# darcsver is needed if you want "./setup.py darcsver" to write a new version stamp in
|
# darcsver is needed if you want "./setup.py darcsver" to write a new version stamp in
|
||||||
# src/allmydata/_version.py, with a version number derived from darcs history.
|
# src/allmydata/_version.py, with a version number derived from darcs history.
|
||||||
# http://pypi.python.org/pypi/darcsver
|
# http://pypi.python.org/pypi/darcsver
|
||||||
setup_requires.append('darcsver >= 1.2.0')
|
setup_requires.append('darcsver >= 1.2.0')
|
||||||
|
|
||||||
if 'trial' in sys.argv[1:] or 'test' in sys.argv[1:]:
|
|
||||||
# Cygwin requires the poll reactor to work at all. Linux requires the poll reactor to avoid
|
|
||||||
# bug #402 (twisted bug #3218). In general, the poll reactor is better than the select
|
|
||||||
# reactor, but it is not available on all platforms. According to exarkun on IRC, it is
|
|
||||||
# available but buggy on some versions of Mac OS X, so just because you can install it
|
|
||||||
# doesn't mean we want to use it on every platform.
|
|
||||||
if sys.platform in ("linux2", "cygwin"):
|
|
||||||
if not [a for a in sys.argv if a.startswith("--reactor")]:
|
|
||||||
sys.argv.append("--reactor=poll")
|
|
||||||
|
|
||||||
# setuptools_darcs is required to produce complete distributions (such as with
|
# setuptools_darcs is required to produce complete distributions (such as with
|
||||||
# "sdist" or "bdist_egg"), unless there is a PKG-INFO file present which shows
|
# "sdist" or "bdist_egg"), unless there is a PKG-INFO file present which shows
|
||||||
# that this is itself a source distribution.
|
# that this is itself a source distribution.
|
||||||
|
|
Loading…
Reference in New Issue