Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2017-10-03 11:46:28 +0300
committerStephen Finucane <stephen@that.guru>2017-10-10 16:06:10 +0300
commiteb8efce7d8172e41139acd26196dd164c6272583 (patch)
tree62badb2c9ac6ed490026c05c69690aad8be0f691 /setup.py
parentdbd58d4c5100dde6449c5a2fd567ab5ae52232c6 (diff)
requirements: Reduce duplication
Simply installing packages will ensure that most of the dependencies in 'setup.py' are installed, meaning 'test-reqs.txt' need only contain those necessary for testing. The only notable change is that the 'simplejson' module is dropped from the requirements list. This included as a dependency for the PyPy target, but it appears that this is not necessary today (though it may have been when the target was added in 2011). This retains 'setup.py test' which, as noted in the tox docs [1], is sometimes expected for downstream distribution testing. We may wish to find a way to synchronize requirements between 'test-reqs.txt' and this section in the future, but that's work for another day. [1] https://tox.readthedocs.io/en/latest/example/basic.html#integration-with-setup-py-test-command Signed-off-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/setup.py b/setup.py
index b2d7ad4cc..618620b50 100644
--- a/setup.py
+++ b/setup.py
@@ -69,10 +69,17 @@ extras_require = {
],
'test': [
'pytest',
- 'mock', # it would be better for 'test:python_version in 2.7'
- 'simplejson', # better: 'test:platform_python_implementation=="PyPy"'
+ 'pytest-cov',
'html5lib',
],
+ 'test:python_version<"3"': [
+ 'enum34',
+ 'mock',
+ ],
+ 'test:python_version>="3"': [
+ 'mypy',
+ 'typed_ast',
+ ],
}
# Provide a "compile_catalog" command that also creates the translated
@@ -83,10 +90,7 @@ cmdclass = {}
try:
from babel.messages.pofile import read_po
from babel.messages.frontend import compile_catalog
- try:
- from simplejson import dump
- except ImportError:
- from json import dump
+ from json import dump
except ImportError:
pass
else: