Fix: require pytest-runner only for test command

Change-Id: I62b82316745c362f1ecdf97e0f9029b7c136953e
This commit is contained in:
Dmitry Sutyagin 2016-09-21 17:26:01 +03:00
parent e493b44a4d
commit 7eaa5705a2
3 changed files with 10 additions and 8 deletions

View File

@ -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']
)

View File

@ -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

View File

@ -1,6 +1,6 @@
[tox]
minversion = 2.0
envlist = py34,py27,pypy,pep8
envlist = py27,pypy,pep8
skipsdist = True
[testenv]