On 2024/02/24 22:51, Daniel Dickman wrote:
> 
> 
> On Wed, 21 Feb 2024, Anthony J. Bentley wrote:
> 
> > CVSROOT:    /cvs
> > Module name:        ports
> > Changes by: [email protected] 2024/02/21 22:44:26
> > 
> > Modified files:
> >     emulators/gambatte: Makefile 
> > 
> > Log message:
> > Python 2 is only used for tests; fix {BUILD,RUN}_DEPENDS.
> > 
> > 
> 
> Surprisingly I think this might now need an explicit:
> 
> TEST_DEPENDS = lang/python/${MODPY_VERSION}
> 
> Without Python already installed and without a TDEP on py-test, there's 
> nothing to force python to be installed.

pytest is python3-only so that wouldn't help anyway.

> And the latest commit now hides the fact that gambatte is a consumer of 
> python2 from show-reverse-deps.
> 
> Maybe something that should be fixed in python.port.mk? I haven't looked 
> too closely what the python module does for tests. On the other hand there 
> are probably very few ports left with TDEPs on python 2 so might not be 
> worth fixing centrally...

I first thought that TEST_DEPENDS (either lang/python/${MODPY_VERSION}
or ${MODPY_RUN_DEPENDS}) would be the right thing to do, but then I
spotted MODPY_TESTDEP so actually I think we need:

Index: python.port.mk
===================================================================
RCS file: /cvs/ports/lang/python/python.port.mk,v
retrieving revision 1.183
diff -u -p -r1.183 python.port.mk
--- python.port.mk      22 Dec 2023 12:51:20 -0000      1.183
+++ python.port.mk      25 Feb 2024 10:37:30 -0000
@@ -132,6 +132,8 @@ NO_TEST = Yes
 MODPY_TEST_DEPENDS =   ${RUN_DEPENDS}
 MODPY_TEST_DEPENDS +=  devel/py-test${MODPY_FLAVOR}
 .  endif
+.else
+MODPY_TEST_DEPENDS =   ${MODPY_RUN_DEPENDS}
 .endif
 
 .if ${NO_BUILD:L} == "no"

Reply via email to