Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Sep 2022 16:07:54 +0900
From:      Tatsuki Makino <tatsuki_makino@hotmail.com>
To:        Shane Ambler <FreeBSD@ShaneWare.Biz>, ports@freebsd.org
Subject:   Re: Python version dependencies in pkg
Message-ID:  <PSAPR03MB5639F69C594D482C7A152DC0FA569@PSAPR03MB5639.apcprd03.prod.outlook.com>
In-Reply-To: <1fdde4e6-fa80-720f-7c85-8417d2a3b642@ShaneWare.Biz>
References:  <8B490359-27A3-410C-AE98-C1362D4FA9F0@gushi.org> <CAN6yY1sGnDF-oReRMFeVz78oGoTfUvsvwUOQwoBZWN9ibjTw3A@mail.gmail.com> <B2A3A400-F21A-4E92-8116-41E7945E4E5C@gushi.org> <CAN6yY1ujCH9Xnv3QN-GF8hN75v%2BxGkOTHrsr25jzxGNGdYW2vQ@mail.gmail.com> <89D2B2D7-FA3D-46F5-A93B-4846950A157C@gushi.org> <65597c37-813b-d0ed-ea9f-8591b68cf097@gwdg.de> <20220929083939.Horde.Viq2uLBgUctcrsgmaJxN_1u@webmail.leidinger.net> <F4395689-FFD7-4591-BE5C-3F15983BF82D@gushi.org> <PSAPR03MB5639D5A4E9655F3AE61361E6FA579@PSAPR03MB5639.apcprd03.prod.outlook.com> <1fdde4e6-fa80-720f-7c85-8417d2a3b642@ShaneWare.Biz>

next in thread | previous in thread | raw e-mail | index | archive | help
Shane Ambler wrote on 2022/09/30 13:54:
> On 30/9/22 7:05 am, Tatsuki Makino wrote:
>> Currently, two versions of Python are allowed to be installed on FreeBSD.
>> One is Python 2.7 but EOL.
> 
> You can install as many python major versions as you want or need, that
> means you can also install many of the py modules for each version. Note
> that some have conflicts and some only need concurrent option added to
> them to prevent conflicts.
> 
> Being the maintainer of some py modules, I have them all installed so
> I can verify that all py versions build and install without conflict.

Yes, we need to consider with regard to conflicts.
But it is difficult to cause conflicts unless we go the extra way.
Because...

USES=python means USES=python:3.7+. It is so by default value of _PYTHON_ARGS.
If we want to use 2.7, we need to deliberately make them use it.

And there is only one FLAVOR for Python, the default version.
This can be checked with a command like the following

make -C /usr/ports/multimedia/libopenshot/ -V USE_PYTHON:Mallflavors -V FLAVORS

This means that it is not possible to propagate FLAVOR other than the default version.
No packages other than the default version will be created.
It is USE_PYTHON=allflavors that allows the use of FLAVOR other than the default version.
Such a port will produce multiple FLAVORs with the following command.

make -C /usr/ports/math/py-numpy/ -V USES:Mpython\* -V USE_PYTHON:Mallflavors -V FLAVORS

The results will vary depending on the version range.

make -C /usr/ports/math/py-numpy/ -V USES:Mpython\* -V USE_PYTHON:Mallflavors -V FLAVORS USES=python:2.7-3.8


...
Conflicts can only happen intentionally.
And, I wrote the earlier email because I think "this is a great mechanism" :)

Regards.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?PSAPR03MB5639F69C594D482C7A152DC0FA569>