I need to add a dependency to a port, but the dependency uses python. My port doesn't use python itself, it just needs a python-using pkg installed. But when I try to depend on that package with a line like this:

RUN_DEPENDS+= py-certbot>=0:security/py-certbot

I get a poudriere error like this:

Error: local/basecfg dependency on security/py-certbot has wrong PKGNAME of 'py-certbot' but should be 'py38-certbot'

This works:

RUN_DEPENDS+= py${PYTHON_DEFAULT:S/.//}-certbot>=0:security/py-certbot

but that's definitely a kludge. The Porter's Handbook hints at using PYTHON_PKGNAMEPREFIX or PYTHON_SUFFIX, but neither of those gets defined unless I add USES+=python to local/basecfg and that's not correct either.

So how do I *officially* tell the ports system to just install security/py-certbot with whatever is the current default flavour?

Reply via email to