Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jul 2015 15:58:09 +0000 (UTC)
From:      Fukang Chen <loader@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r393163 - in head/devel/py-pytest-cache: . files
Message-ID:  <201507291558.t6TFw9m0008652@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: loader (doc committer)
Date: Wed Jul 29 15:58:08 2015
New Revision: 393163
URL: https://svnweb.freebsd.org/changeset/ports/393163

Log:
  - 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

Added:
  head/devel/py-pytest-cache/files/
  head/devel/py-pytest-cache/files/patch-setup.py   (contents, props changed)
Modified:
  head/devel/py-pytest-cache/Makefile

Modified: head/devel/py-pytest-cache/Makefile
==============================================================================
--- head/devel/py-pytest-cache/Makefile	Wed Jul 29 15:42:13 2015	(r393162)
+++ head/devel/py-pytest-cache/Makefile	Wed Jul 29 15:58:08 2015	(r393163)
@@ -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>

Added: head/devel/py-pytest-cache/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-pytest-cache/files/patch-setup.py	Wed Jul 29 15:58:08 2015	(r393163)
@@ -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',



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507291558.t6TFw9m0008652>