aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2022-04-06 17:20:10 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2022-04-06 22:38:33 +0000
commite38e0e6063c33fc7cea17ca466902ebde17f772f (patch)
tree07e65fabe029bc012d5fd5ac5cb32ffd4e85d9ad
parentd01e186749d9e2bd3be15a4038fe62e751dfcf70 (diff)
downloadports-e38e0e6063c33fc7cea17ca466902ebde17f772f.tar.gz
ports-e38e0e6063c33fc7cea17ca466902ebde17f772f.zip
devel/py-pytest4-cache: preserve pytest4 counterpart of corresponding port
PR: 256624
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-pytest-cache/Makefile2
-rw-r--r--devel/py-pytest4-cache/Makefile29
-rw-r--r--devel/py-pytest4-cache/distinfo3
-rw-r--r--devel/py-pytest4-cache/files/patch-setup.py36
-rw-r--r--devel/py-pytest4-cache/pkg-descr3
6 files changed, 74 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index ca090d7edd3f..7ffd5c6b8c34 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5109,6 +5109,7 @@
SUBDIR += py-pytest-xprocess
SUBDIR += py-pytest4
SUBDIR += py-pytest4-asyncio
+ SUBDIR += py-pytest4-cache
SUBDIR += py-pytest4-cov
SUBDIR += py-python-Levenshtein
SUBDIR += py-python-application
diff --git a/devel/py-pytest-cache/Makefile b/devel/py-pytest-cache/Makefile
index 71ce81ba19cc..e3a76e380ac4 100644
--- a/devel/py-pytest-cache/Makefile
+++ b/devel/py-pytest-cache/Makefile
@@ -12,6 +12,8 @@ COMMENT= Pytest plugin with mechanisms for caching across test runs
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
+CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}pytest4-cache
+
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=2.2:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}execnet>=1.2:sysutils/py-execnet@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
diff --git a/devel/py-pytest4-cache/Makefile b/devel/py-pytest4-cache/Makefile
new file mode 100644
index 000000000000..45fcf5cb9b12
--- /dev/null
+++ b/devel/py-pytest4-cache/Makefile
@@ -0,0 +1,29 @@
+# Created by: Fukang Chen <loader@FreeBSD.org>
+
+PORTNAME= pytest4-cache
+PORTVERSION= 1.0
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME:C/4//}-${PORTVERSION}
+
+MAINTAINER= loader@FreeBSD.org
+COMMENT= Pytest plugin with mechanisms for caching across test runs (legacy version for pytest 4)
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}pytest-cache
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest4>=2.2:devel/py-pytest4@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}execnet>=1.2:sysutils/py-execnet@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest4>0:devel/py-pytest4@${PY_FLAVOR}
+
+NO_ARCH= yes
+USES= python:3.6+
+USE_PYTHON= autoplist distutils
+DO_MAKE_TEST= ${SETENV} ${TEST_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP}
+TEST_TARGET= test
+PYDISTUTILS_PKGNAME= ${PORTNAME:C/4//}
+
+.include <bsd.port.mk>
diff --git a/devel/py-pytest4-cache/distinfo b/devel/py-pytest4-cache/distinfo
new file mode 100644
index 000000000000..919dc0f71ed9
--- /dev/null
+++ b/devel/py-pytest4-cache/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1649284663
+SHA256 (pytest-cache-1.0.tar.gz) = be7468edd4d3d83f1e844959fd6e3fd28e77a481440a7118d430130ea31b07a9
+SIZE (pytest-cache-1.0.tar.gz) = 16242
diff --git a/devel/py-pytest4-cache/files/patch-setup.py b/devel/py-pytest4-cache/files/patch-setup.py
new file mode 100644
index 000000000000..75426dd0c02d
--- /dev/null
+++ b/devel/py-pytest4-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',
diff --git a/devel/py-pytest4-cache/pkg-descr b/devel/py-pytest4-cache/pkg-descr
new file mode 100644
index 000000000000..8c50b16f8e2c
--- /dev/null
+++ b/devel/py-pytest4-cache/pkg-descr
@@ -0,0 +1,3 @@
+pytest plugin with mechanisms for caching across test runs.
+
+WWW: https://bitbucket.org/hpk42/pytest-cache/