Fix: require pytest-runner only for test command
Change-Id: I62b82316745c362f1ecdf97e0f9029b7c136953e
This commit is contained in:
parent
e493b44a4d
commit
7eaa5705a2
14
setup.py
14
setup.py
@ -17,15 +17,15 @@
|
||||
|
||||
|
||||
from setuptools import setup
|
||||
import os
|
||||
from timmy.env import project_name, version
|
||||
import sys
|
||||
|
||||
pname = project_name
|
||||
include_package_data = True
|
||||
|
||||
if os.environ.get("READTHEDOCS", False):
|
||||
rqfiles = None
|
||||
include_package_data = False
|
||||
if sys.argv[1] == 'test':
|
||||
setup_requires = ['pytest-runner']
|
||||
else:
|
||||
setup_requires = []
|
||||
|
||||
|
||||
setup(name=pname,
|
||||
@ -40,8 +40,8 @@ setup(name=pname,
|
||||
long_description=open('README.md').read(),
|
||||
packages=[pname, '%s_data' % pname],
|
||||
install_requires=['pyyaml'],
|
||||
include_package_data=include_package_data,
|
||||
include_package_data=True,
|
||||
entry_points={'console_scripts': ['%s=%s.cli:main' % (pname, pname)]},
|
||||
setup_requires=['pytest-runner'],
|
||||
setup_requires=setup_requires,
|
||||
tests_require=['pytest']
|
||||
)
|
||||
|
@ -9,3 +9,5 @@ testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
coverage>=3.6 # Apache-2.0
|
||||
sphinx-argparse
|
||||
pytest-runner
|
||||
pytest
|
||||
|
Loading…
Reference in New Issue
Block a user