Skip to content

Commit

Permalink
Merge pull request #5 from okeuday/develop
Browse files Browse the repository at this point in the history
Fix setup.py build dependency
  • Loading branch information
wolph committed Sep 3, 2018
2 parents 5807e51 + 9cdee71 commit eec70b2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions setup.cfg
@@ -1,3 +1,6 @@
[aliases]
test=pytest

[metadata]
description-file = README.rst

Expand Down
7 changes: 6 additions & 1 deletion setup.py
@@ -1,4 +1,5 @@
import os
import sys
import setuptools

# To prevent importing about and thereby breaking the coverage info we use this
Expand All @@ -14,6 +15,10 @@
long_description = 'See http://pypi.python.org/pypi/python-utils/'


needs_pytest = set(['ptr', 'pytest', 'test']).intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []


if __name__ == '__main__':
setuptools.setup(
name=about['__package_name__'],
Expand All @@ -27,7 +32,7 @@
long_description=long_description,
install_requires=['six'],
tests_require=['pytest'],
setup_requires=['pytest-runner'],
setup_requires=[] + pytest_runner,
classifiers=['License :: OSI Approved :: BSD License'],
)

2 changes: 1 addition & 1 deletion tox.ini
Expand Up @@ -11,7 +11,7 @@ basepython =
pypy: pypy
deps = -r{toxinidir}/tests/requirements.txt

commands = python setup.py pytest {posargs}
commands = python setup.py test {posargs}

[testenv:flake8]
basepython = python2.7
Expand Down

0 comments on commit eec70b2

Please sign in to comment.