diff --git a/setup.py b/setup.py index 2466e9f..e7c6a6b 100644 --- a/setup.py +++ b/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'] ) diff --git a/test-requirements.txt b/test-requirements.txt index 1658360..947f880 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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 diff --git a/tox.ini b/tox.ini index 2058a08..db333dd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 2.0 -envlist = py34,py27,pypy,pep8 +envlist = py27,pypy,pep8 skipsdist = True [testenv]