Diff below turns off python2 tests for py-requests.
This is needed so py-flask can move to python3.
The DEP chain is:
- py-requests has a TDEP on py-test-httpbin
- py-test-httpbin has an RDEP on py-httpbin
- py-httpbin has an RDEP on py-flask
ok?
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/py-requests/Makefile,v
retrieving revision 1.42
diff -u -p -u -r1.42 Makefile
--- Makefile 14 Nov 2020 12:35:05 -0000 1.42
+++ Makefile 25 Feb 2021 04:12:31 -0000
@@ -5,6 +5,7 @@ COMMENT= elegant and simple HTTP librar
MODPY_EGG_VERSION= 2.25.0
DISTNAME= requests-${MODPY_EGG_VERSION}
PKGNAME= py-${DISTNAME}
+REVISION= 0
CATEGORIES= www
@@ -17,6 +18,9 @@ PERMIT_PACKAGE= Yes
MODULES= lang/python
+FLAVORS= python3
+FLAVOR?=
+
MODPY_PI= Yes
MODPY_PYTEST = Yes
MODPY_SETUPTOOLS= Yes
@@ -25,15 +29,17 @@ RUN_DEPENDS= devel/py-certifi${MODPY_FL
net/py-idna${MODPY_FLAVOR} \
textproc/py-chardet${MODPY_FLAVOR} \
www/py-urllib3${MODPY_FLAVOR}
+
+.if ${FLAVOR:Mpython3}
TEST_DEPENDS= devel/py-test-cov${MODPY_FLAVOR} \
devel/py-test-mock${MODPY_FLAVOR} \
devel/py-test-httpbin${MODPY_FLAVOR} \
devel/py-test-xdist${MODPY_FLAVOR} \
net/py-socks${MODPY_FLAVOR} \
www/py-urllib3${MODPY_FLAVOR}
-
-FLAVORS= python3
-FLAVOR?=
+.else
+NO_TEST = Yes
+.endif
WRKDIST= ${WRKDIR}/requests-${MODPY_EGG_VERSION}