On 2015/01/08 18:00, Henrik Friedrichsen wrote:
> Hey,
> 
> I'm currently working on a port that can be compiled for Python 2 and 3.
> This port installs a header into the Python2/3 include directory.
> 
> On Python 2 this is: /usr/local/include/python2.7/sip.h, whereas on
> Python3 it is /usr/local/include/python3.4m/sip.h.
> 
> So far so good.
> 
> 'make plist' has generated the following entry for the PLIST:
> include/python${MODPY_VERSION}/sip.h
> 
> This works fine for Python2, but for Python3 it lacks the trailing 'm'
> after the version number.
> 
> What would be the best expression for a PLIST file to cover both cases?
> 
> Thanks
> Henrik
> 

In general for py2+3 ports: generate the PLIST with FLAVOR=python3, and
add ${MODPY_COMMENT} to the start of the line for any MODPY_PYCACHE
directories - e.g. see graphics/py-Pillow/pkg/PLIST-main.

Specifically for include/python3.4m I think you are going to need to
setup a variable and subst it. Maybe like this (untested)

MODPY_SHORTINCDIR = ${MODPY_INCDIR:S%${LOCALBASE}/%%}
SUBST_VARS += MODPY_SHORTINCDIR

Reply via email to