On 2016/11/07 07:13, Remi Pointel wrote:
> On 11/06/16 21:00, Daniel Jakots wrote:
> > Hi,
> > 
> > In python.port.mk there is
> > .if ${MODPY_MAJOR_VERSION} == 2
> > MODPY_BIN_SUFFIX =
> > .elif ${MODPY_MAJOR_VERSION} == 3
> > MODPY_BIN_SUFFIX =      -3
> > .endif
> > 
> > So guarding the rename in Makefile with if ${FLAVOR:Mpython3} is
> > useless. And the day we'll switch to py3, having those if will even be
> > a problem.
> > 
> > Here's a diff to remove them (those I found).
> > 
> > Would it make sense to define something in python.port.mk to unify
> > that? Currently it's done in many different ways.
> > 
> > Comments? OK?
> > 
> 
> Sounds good for me except these 2 ports:
> 
> > Index: security/py-crypto/Makefile
> > ===================================================================
> > RCS file: /cvs/ports/security/py-crypto/Makefile,v
> > retrieving revision 1.36
> > diff -u -p -r1.36 Makefile
> > --- security/py-crypto/Makefile     20 Mar 2016 16:12:26 -0000      1.36
> > +++ security/py-crypto/Makefile     6 Nov 2016 19:51:04 -0000
> > @@ -42,9 +42,7 @@ do-install:
> >     @${MODPY_INSTALL_TARGET}
> >     ${INSTALL_DATA_DIR} ${DOCSDIR}
> >     ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
> > -.if ${FLAVOR:Mpython3}
> >     mv ${PREFIX}/share/doc/py-crypto ${PREFIX}/share/doc/py3-crypto
> > -.endif
> 
> You can't do this here, because MODPY_BIN_SUFFIX is not used.

Use MODPY_PY_PREFIX here.

> >  do-test: fake
> >     cd ${WRKSRC} && ${MAKE_ENV} \
> > Index: security/py-keyring/Makefile
> > ===================================================================
> > RCS file: /cvs/ports/security/py-keyring/Makefile,v
> > retrieving revision 1.10
> > diff -u -p -r1.10 Makefile
> > --- security/py-keyring/Makefile    27 Aug 2016 17:40:17 -0000      1.10
> > +++ security/py-keyring/Makefile    6 Nov 2016 19:51:04 -0000
> > @@ -29,9 +29,7 @@ TEST_DEPENDS=             devel/py-test${MODPY_FLAV
> >  FLAVORS =          python3
> >  FLAVOR ?=
> > 
> > -.if ${FLAVOR:Mpython3}
> >  post-install:
> >     mv ${PREFIX}/bin/keyring ${PREFIX}/bin/keyring-${MODPY_VERSION}
> > -.endif
> 
> Maybe MODPY_VERSION should be replaced by MODPY_BIN_SUFFIX?

Yes, agreed.

Reply via email to