Friday, September 13, 2019

Re: Remove py-mock from python3 flavor of devel/py-objgraph

On Sat, Sep 14, 2019 at 12:26:41AM +0200, Klemens Nanni wrote:
> On Fri, Sep 13, 2019 at 06:10:59PM -0400, Kurt Mosiejczuk wrote:
> > +.if !${FLAVOR:Mpython3}
> > +TEST_DEPENDS = devel/py-mock
> > +.endif
> We're still far away from switching to Python 3 by default, but would it
> make sense to check `${MODPY_VERSION} == ${MODPY_DEFAULT_VERSION_2}'
> here instead of implying that not building the Python 3 flavour equals
> Python 2?

> That way switching from 2 to 3 continues to work; it also seems
> logically more obvious to me... just a thought.

The problem is that doesn't work (see below). I have to do the ${FLAVOR}
version *after* defining FLAVOR. All these checks happen before
lang/python ends up being read in.

RUN_DEPENDS = math/py-graphviz${MODPY_FLAVOR}
TEST_DEPENDS = math/graphviz

.if ${MODPY_VERSION} == ${MODPY_DEFAULT_VERSION_2}
TEST_DEPENDS = devel/py-mock
.endif

.include <bsd.port.mk>
superhell$ make test
*** Parse error in /usr/ports/devel/py-objgraph: Malformed conditional (${MODPY_VERSION} == ${MODPY_DEFAULT_VERSION_2}) (Makefile:28)
*** Parse error: Missing dependency operator (Makefile:28)
superhell$

--Kurt

No comments:

Post a Comment