Date: Fri, 20 Aug 2021 10:30:32 +1000 From: Kubilay Kocak <koobs@FreeBSD.org> To: Tatsuki Makino <tatsuki_makino@hotmail.com>, Mel Pilgrim <list_freebsd@bluerosetech.com> Cc: freebsd-ports@freebsd.org, python <python@FreeBSD.org> Subject: Re: How do I depend on a python port without caring about flavor Message-ID: <d7c8c457-78ac-5311-91ab-a77059261999@FreeBSD.org> In-Reply-To: <PSAPR03MB5639BC487FD2BCAC763BA057FAC09@PSAPR03MB5639.apcprd03.prod.outlook.com> References: <891c5f92-0859-dafc-3356-2d2a08fcfc3c@bluerosetech.com> <PSAPR03MB5639BC487FD2BCAC763BA057FAC09@PSAPR03MB5639.apcprd03.prod.outlook.com>
index | next in thread | previous in thread | raw e-mail
On 20/08/2021 7:07 am, Tatsuki Makino wrote:
> I also want to know the official way :)
>
> I think the following ports are strange for python.
>
> devel/llvm{-devel,12,11,10,90,80,70}
> databases/rrdtool
> graphics/opencv
> and astro/geographiclib (which are maintained by me :) )
>
> They do not seem to be able to support non-default versions of python.
> So they are not transparent to FLAVOR, even if they are libraries.
>
> I am thinking of the following changes for the next version of astro/geographiclib.
>
> - sphinx-build:textproc/py-sphinx
> + ${PYTHON_PKGNAMEPREFIX}sphinx>=0:textproc/py-sphinx@${PY_FLAVOR}
>
> If there is python:env in variable USES, it seems that variables such as PY_FLAVOR will be present.
>
> ... So, I'm not sure, what should I do? :)
>
> Regards.
>
>
Yep so:
*_DEPENDS=${PYTHONPKGNAMEPREFIX}foo<vspec>:port/origin@${PY_FLAVOR}
Is the correct method, in which PY_FLAVOR gets derived from
DEFAULT_VERSIONS, following the frameworks default versions over time,
and honoring user default preferences and selection.
With USES=python:env to bring in the relevant variables for use.
One just needs to *also* make sure that for any scripts provided in the
dependent port, they use ${PYTHON_CMD} for shebangs, etc, rather than
env python env python2, env python3, who's targets change over time
(depending on the default version)
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d7c8c457-78ac-5311-91ab-a77059261999>
