On Fri, Nov 06 2020, Daniel Dickman <didick...@gmail.com> wrote:
> This diff sets NO_TEST=Yes for cython under python2 so numpy can be 
> updated.
>
> If we don't go this route, we'd have to convert all the cython consumers 
> to python3 so cython can be made python3-only. That means updating 
> consumers like py-sphinx. So going down that path doesn't look very 
> simple.

As a policy I think that the TEST_DEPENDS of python2-only ports
shouldn't block updates of other ports to python3-only versions.

> ok on the simpler approach below so we can move forward?

Makes sense to me, no need to bump REVISION though.  I'm not sure the
comment helps as the .if block looks self-explanatory to me.

>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/cython/Makefile,v
> retrieving revision 1.45
> diff -u -p -u -r1.45 Makefile
> --- Makefile  10 Oct 2020 18:31:55 -0000      1.45
> +++ Makefile  7 Nov 2020 00:14:48 -0000
> @@ -6,6 +6,7 @@ MODPY_EGG_VERSION =   0.29.21
>  DISTNAME =           Cython-${MODPY_EGG_VERSION}
>  PKGNAME =            py-cython-${MODPY_EGG_VERSION}
>  CATEGORIES =         lang
> +REVISION =           0
>  
>  HOMEPAGE =           https://cython.org/
>  
> @@ -17,13 +18,22 @@ PERMIT_PACKAGE =  Yes
>  WANTLIB += pthread ${MODPY_WANTLIB}
>  
>  MODULES =            lang/python
> +
> +FLAVORS =            python3
> +FLAVOR ?=
> +
>  MODPY_PI =           Yes
>  MODPY_SETUPTOOLS =   Yes
> +
>  BUILD_DEPENDS =              devel/py-setuptools_git${MODPY_FLAVOR}
> -TEST_DEPENDS =               math/py-numpy${MODPY_FLAVOR}
>  
> -FLAVORS =            python3
> -FLAVOR ?=
> +# XXX: no tests under python2 so numpy can be updated.
> +#      (numpy>=1.17.0 is python3-only)
> +.if ${FLAVOR:Mpython3}
> +TEST_DEPENDS +=              math/py-numpy${MODPY_FLAVOR}
> +.else
> +NO_TEST =            Yes
> +.endif
>  
>  PORTHOME =           ${WRKDIR}
>  
>


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to