@@ -237,47 +237,14 @@ If you wish to disable this feature, you can pass the command line option
237237Integration with setuptools/distribute test commands
238238----------------------------------------------------
239239
240- Distribute/Setuptools support test requirements
241- and you can extend its test command to trigger
242- a test run when ``python setup.py test`` is issued::
243- 
244-     from setuptools.command.test import test as TestCommand
245-     import sys
246- 
247-     class Tox(TestCommand):
248-         user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
249-         def initialize_options(self):
250-             TestCommand.initialize_options(self)
251-             self.tox_args = None
252-         def finalize_options(self):
253-             TestCommand.finalize_options(self)
254-             self.test_args = []
255-             self.test_suite = True
256-         def run_tests(self):
257-             #import here, cause outside the eggs aren't loaded
258-             import tox
259-             import shlex
260-             args = self.tox_args
261-             if args:
262-                 args = shlex.split(self.tox_args)
263-             tox.cmdline(args=args)
264- 
265-     setup(
266-         #...,
267-         tests_require=['tox'],
268-         cmdclass = {'test': Tox},
269-         )
270- 
271- Now if you run::
272- 
273-     python setup.py test
274- 
275- this will install tox and then run tox. You can pass arguments to ``tox``
276- using the ``--tox-args`` or ``-a`` command-line options. For example::
277- 
278-     python setup.py test -a "-epy27"
279- 
280- is equivalent to running ``tox -epy27``.
240+ .. warning::
241+ 
242+   Integrating tox into ``setup.py`` is strongly discouraged as 
243+   it breaks standard packaging approaches as used by many downstream distributions
244+   which expect ``setup.py test`` to to test the current interpreter
245+   rather than setting up many virtualenvs.
246+   
247+   
281248
282249Ignoring a command exit code
283250----------------------------
0 commit comments