numpy 1.21 will need py-test 5.4.x or later, while the ports tree is on 
py-test 4.4.0. Many other ports can likely benefit from newer py-test.

Given that py-test has dropped python2 support, I'd like to split the port 
into py2 and py3 ports like was done for setuptools.

Making the actual switch to the python infrastructure will be a bit more 
involved so will do that in a followup diff once this one is imported.

ok to import?

Diff between py-test/Makefile and py2-test/Makefile shown inline below. 
Also pkg/PLIST gets a "@pkgpath devel/py-test" marker (not shown here).

--- py-test/Makefile    Fri May 21 15:50:30 2021
+++ py2-test/Makefile   Sun Oct 24 12:58:49 2021
@@ -1,11 +1,13 @@
 # $OpenBSD: Makefile,v 1.38 2021/05/21 19:50:30 kmos Exp $
 
-COMMENT=               cross-project testing tool for Python
+COMMENT=               cross-project testing tool for Python 2
 
+PORTROACH=             limit:^4\.6
+
 MODPY_EGG_VERSION =    4.4.0
 DISTNAME=              pytest-${MODPY_EGG_VERSION}
 PKGNAME=               py-test-${MODPY_EGG_VERSION}
-REVISION=              3
+REVISION=              4
 
 CATEGORIES=            devel
 
@@ -20,10 +22,8 @@
 MODPY_SETUPTOOLS =     Yes
 MODPY_PYTEST =         Yes
 MODPY_PYTEST_ARGS =    testing
+MODPY_VERSION =                ${MODPY_DEFAULT_VERSION_2}
 
-FLAVORS=               python3
-FLAVOR?=
-
 BUILD_DEPENDS =                devel/py-setuptools_scm${MODPY_FLAVOR}
 
 RUN_DEPENDS =          devel/py-atomicwrites${MODPY_FLAVOR} \
@@ -32,22 +32,18 @@
                        devel/py-pluggy${MODPY_FLAVOR}>=0.9 \
                        devel/py-py${MODPY_FLAVOR} \
                        devel/py-setuptools${MODPY_FLAVOR} \
-                       devel/py-six${MODPY_FLAVOR}
-.if !${FLAVOR:Mpython3}
-RUN_DEPENDS +=         devel/py-funcsigs \
+                       devel/py-six${MODPY_FLAVOR} \
+                       devel/py-funcsigs \
                        devel/py-pathlib2
-.endif
 
 TEST_DEPENDS =         ${FULLPKGNAME}:${FULLPKGPATH} \
                        devel/py-hypothesis${MODPY_FLAVOR} \
                        devel/py-mock${MODPY_FLAVOR} \
                        devel/py-nose${MODPY_FLAVOR} \
                        shells/bash \
-                       www/py-requests${MODPY_FLAVOR}
-.if !${FLAVOR:Mpython3}
-TEST_DEPENDS +=                devel/py-pathlib2 \
+                       www/py-requests${MODPY_FLAVOR} \
+                       devel/pypathlib2 \
                        sysutils/py-scandir
-.endif
 
 post-install:
        mv ${PREFIX}/bin/py.test{,${MODPY_BIN_SUFFIX}}

Attachment: py2-test.tgz
Description: Binary data

Reply via email to