aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorloader <loader@FreeBSD.org>2015-07-29 23:58:08 +0800
committerloader <loader@FreeBSD.org>2015-07-29 23:58:08 +0800
commit19c9647ff487fd51a467fb9a9dbc0c8c37b788b5 (patch)
treeb6347679e23746772e159aed96f2fe7c86680148 /devel
parent11a7653ac38ec09bb470a94bcad67caf4bfb5dad (diff)
downloadfreebsd-ports-gnome-19c9647ff487fd51a467fb9a9dbc0c8c37b788b5.tar.gz
freebsd-ports-gnome-19c9647ff487fd51a467fb9a9dbc0c8c37b788b5.tar.zst
freebsd-ports-gnome-19c9647ff487fd51a467fb9a9dbc0c8c37b788b5.zip
- Patch setup.py to integrate setuptools test command. Reported upstream: [0]
[0] https://bitbucket.org/hpk42/pytest-cache/pull-requests/13/ Approved by: koobs Differential Revision: https://reviews.freebsd.org/D3185
Diffstat (limited to 'devel')
-rw-r--r--devel/py-pytest-cache/Makefile2
-rw-r--r--devel/py-pytest-cache/files/patch-setup.py36
2 files changed, 37 insertions, 1 deletions
diff --git a/devel/py-pytest-cache/Makefile b/devel/py-pytest-cache/Makefile
index 2edb90051962..fe42ff61676c 100644
--- a/devel/py-pytest-cache/Makefile
+++ b/devel/py-pytest-cache/Makefile
@@ -26,6 +26,6 @@ USES= python
USE_PYTHON= autoplist distutils
regression-test: build
- @cd ${WRKSRC} && py.test
+ @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
.include <bsd.port.mk>
diff --git a/devel/py-pytest-cache/files/patch-setup.py b/devel/py-pytest-cache/files/patch-setup.py
new file mode 100644
index 000000000000..75426dd0c02d
--- /dev/null
+++ b/devel/py-pytest-cache/files/patch-setup.py
@@ -0,0 +1,36 @@
+--- setup.py.orig 2013-06-04 19:10:04 UTC
++++ setup.py
+@@ -1,4 +1,24 @@
+ from setuptools import setup
++from setuptools.command.test import test as TestCommand
++
++class PyTest(TestCommand):
++ user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
++
++ def initialize_options(self):
++ TestCommand.initialize_options(self)
++ self.pytest_args = []
++
++ def finalize_options(self):
++ TestCommand.finalize_options(self)
++ self.test_args = []
++ self.test_suite = True
++
++ def run_tests(self):
++ # import here, because outside the eggs aren't loaded
++ import pytest
++ errno = pytest.main(self.pytest_args)
++ sys.exit(errno)
++
+ setup(
+ name='pytest-cache',
+ description='pytest plugin with mechanisms for caching across test runs',
+@@ -10,6 +30,8 @@ setup(
+ py_modules=['pytest_cache'],
+ entry_points={'pytest11': ['cacheprovider = pytest_cache']},
+ install_requires=['pytest>=2.2', 'execnet>=1.1.dev1', ],
++ tests_require=['pytest'],
++ cmdclass={'test': PyTest},
+ classifiers=[
+ 'Development Status :: 3 - Alpha',
+ 'Intended Audience :: Developers',