Re: turn off all python2 tests

2021-02-27 Thread Stuart Henderson
On 2021/02/26 21:05, Daniel Dickman wrote:
> As much as I like running reggression tests, turning off all python2 tests 
> would make it quite a bit easier to move to python3.
> 
> Doing this would also allow us to update some of the ports used heavily in 
> tests like py-test, etc.
> 
> thoughts?

too big a hammer I think, the python module is used for ports which
aren't really "python ports",

$ grep python/2 /usr/ports/INDEX |cut -d'|' -f2|egrep -v /py2?-|cut -d, 
-f1|uniq|wc -l
 209

perhaps it should only disable tests where it's python.port.mk that
provides the test infrastructure? i.e. use the same conditional as where
do-test is defined later in the python.port.mk?

# setuptools supports regress testing from setup.py using a standard target
.  if !target(do-test) && \
  (${MODPY_SETUPUTILS:L} == "yes" || ${MODPY_PYTEST:L} == "yes")
do-test:
@${MODPY_TEST_TARGET}
.  endif



turn off all python2 tests

2021-02-26 Thread Daniel Dickman
As much as I like running reggression tests, turning off all python2 tests 
would make it quite a bit easier to move to python3.

Doing this would also allow us to update some of the ports used heavily in 
tests like py-test, etc.

thoughts?

Index: python.port.mk
===
RCS file: /cvs/ports/lang/python/python.port.mk,v
retrieving revision 1.131
diff -u -p -u -r1.131 python.port.mk
--- python.port.mk  23 Feb 2021 22:04:35 -  1.131
+++ python.port.mk  27 Feb 2021 02:02:55 -
@@ -75,6 +75,8 @@ MODPY_PYC_MAGIC_TAG =
 MODPY_COMMENT ="@comment "
 MODPY_ABI3SO =
 MODPY_PYOEXTENSION =   pyo
+# turn off all python2 tests to ease switching to python3
+NO_TEST =  Yes
 .elif ${MODPY_MAJOR_VERSION} == 3
 # replace py- prefix by py3-
 FULLPKGNAME ?= ${PKGNAME:S/^py-/py3-/}${FLAVOR_EXT:S/-python3//}