aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-02-25 08:52:48 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-02-25 08:52:48 -0500
commit34bd844443954929c7199e772e715ed6f0669332 (patch)
tree9a9428fb34d1b6c7c7e8dac30515fc7d979a4a6a /setup.py
parent70b0594ff0d67dba65feb59a606007768eced05b (diff)
downloadexternal_python_setuptools-34bd844443954929c7199e772e715ed6f0669332.tar.gz
external_python_setuptools-34bd844443954929c7199e772e715ed6f0669332.tar.bz2
external_python_setuptools-34bd844443954929c7199e772e715ed6f0669332.zip
Update conditional setup-time dependency to also support pytest and test commands.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 807c0180..e1b302a3 100755
--- a/setup.py
+++ b/setup.py
@@ -75,7 +75,8 @@ if sys.platform == 'win32' or force_windows_specific_files:
package_data.setdefault('setuptools', []).extend(['*.exe'])
package_data.setdefault('setuptools.command', []).extend(['*.xml'])
-pytest_runner = ['pytest-runner'] if 'ptr' in sys.argv else []
+needs_pytest = set(['ptr', 'pytest', 'test']) in sys.argv else []
+pytest_runner = ['pytest-runner'] if needs_pytest else []
needs_sphinx = set(['build_sphinx', 'upload_docs']).intersection(sys.argv)
sphinx = ['sphinx', 'rst.linker'] if needs_sphinx else []