Changeset - dd676fdeda0f
[Not reviewed]
default
0 3 1
Mads Kiilerich - 9 years ago 2016-07-28 16:28:34
madski@unity3d.com
setup: move test dependencies to dev_requirements.txt to make them optional

Remove the need for having test tools on production systems. Installing test
dependencies is made an extra explicit step.

pip is the future, but doesn't have the same tests_require features as
setuptools kind of has.

I don't like this way of handling it without setup.py support and with explicit
naming of the ugly dev_requirements.txt ... but that seems to be the way to do
it.
4 files changed with 15 insertions and 12 deletions:
0 comments (0 inline, 0 general)
dev_requirements.txt
Show inline comments
 
new file 100644
 
pytest>=2.7.0,<3.0
 
pytest-runner
 
pytest-sugar>=0.7.0,<1.0.0
 
webtest==1.4.3
 
mock
 
sphinx
docs/contributing.rst
Show inline comments
 
@@ -48,11 +48,15 @@ on Bitbucket_ and create a local clone o
 
Running tests
 
-------------
 

	
 
After finishing your changes make sure all tests pass cleanly. You can run
 
the testsuite by running ``py.test`` from the project root::
 
After finishing your changes make sure all tests pass cleanly. Install the test
 
dependencies, then run the testsuite by invoking ``py.test`` from the
 
project root::
 

	
 
    pip install -r dev_requirements.txt
 
    py.test
 

	
 
Note that testing on Python 2.6 also requires ``unittest2``.
 

	
 
You can also use ``tox`` to run the tests with all supported Python versions
 
(currently Python 2.6--2.7).
 

	
setup.py
Show inline comments
 
@@ -38,7 +38,6 @@ requirements = [
 
    "alembic>=0.8.0,<0.9",
 
    "waitress==0.8.8",
 
    "webob>=1.0.8,<=1.1.1",
 
    "webtest==1.4.3",
 
    "Pylons>=1.0.0,<=1.0.2",
 
    "Beaker==1.6.4",
 
    "WebHelpers==1.3",
 
@@ -52,24 +51,19 @@ requirements = [
 
    "python-dateutil>=1.5.0,<2.0.0",
 
    "markdown==2.2.1",
 
    "docutils>=0.8.1,<=0.11",
 
    "mock",
 
    "URLObject==2.3.4",
 
    "Routes==1.13",
 
    "pytest>=2.7.0,<3.0",
 
    "pytest-sugar>=0.7.0,<1.0.0",
 
    "dulwich>=0.14.1",
 
    "mercurial>=2.9,<3.9",
 
]
 

	
 
if sys.version_info < (2, 7):
 
    requirements.append("importlib==1.0.1")
 
    requirements.append("unittest2")
 
    requirements.append("argparse")
 

	
 
if not is_windows:
 
    requirements.append("bcrypt>=2.0.0")
 

	
 

	
 
dependency_links = [
 
]
 

	
 
@@ -147,9 +141,7 @@ setup(
 
    url=__url__,
 
    install_requires=requirements,
 
    classifiers=classifiers,
 
    setup_requires=['PasteScript>=1.6.3',
 
                    'pytest-runner'],
 
    tests_require=['pytest'],
 
    setup_requires=['PasteScript>=1.6.3'],
 
    data_files=data_files,
 
    packages=packages,
 
    include_package_data=True,
tox.ini
Show inline comments
 
@@ -6,7 +6,8 @@ envlist = py{26,27}-pytest
 
setenv =
 
    PYTHONHASHSEED = 0
 
deps =
 
    pytest: pytest
 
    -r{toxinidir}/dev_requirements.txt
 
    py26-pytest: unittest2
 
    python-ldap
 
    python-pam
 
commands =
0 comments (0 inline, 0 general)