Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Sep 2022 10:06:37 +0200
From:      Stefan Esser <se@FreeBSD.org>
To:        Dan Mahoney <freebsd@gushi.org>
Cc:        ports@freebsd.org, Alexander Leidinger <Alexander@leidinger.net>
Subject:   Re: Python version dependencies in pkg
Message-ID:  <f5929013-aaf6-5fdf-74dd-f0b9a9e9abac@FreeBSD.org>
In-Reply-To: <20220929083939.Horde.Viq2uLBgUctcrsgmaJxN_1u@webmail.leidinger.net>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 29.09.22 um 08:39 schrieb Alexander Leidinger:
> Quoting Rainer Hurling <rhurlin@gwdg.de> (from Thu, 29 Sep 2022 06:43:49 +0200):
> 
>> Hi Dan,
>>
>> Am 28.09.22 um 23:01 schrieb Dan Mahoney:
[...]
>>> Okay, so in either the package file, or the repo file, is there a bit that 
>>> says "whatever is the default" or that explicitly says "if there's not a 
>>> python, install 3.8"?
>>
>> There is PYTHON_DEFAULT (set to 3.9 ATM) in ports/Mk/bsd.default-versions.mk. 
>> You can override this for example by an entry in /etc/make.conf:
>>
>> DEFAULT_VERSIONS+= python=3.10 python3=3.10
>>
>>>
>>> I realize I'm asking weird minute questions, but I'm noticing that across 
>>> our fleet we have some blend of machines that are 3.7, 3.8, and 3.9, and 
>>> trying to just remove 3.7 attempts to deinstall packages that would work 
>>> with 3.8.
>>
>> To update from one Python version to another, there are descriptions in 
>> /usr/ports/UPDATING, see entry from 20220626.
>>
>> After changing Python itself (i.e. from 3.7 to 3.9), rebuilding depending 
>> py3x-packages will do this version change for you (i.e. from py3.7-* to 
>> py3.9-*, ...). It works via the so called flavors.
> 
> To extend a little bit on that:
> "pkg info | grep py3" will give you a list of ports which are depending on a 
> specific python version. If it lists py37-xxx it means the xxx port depends 
> upon python 3.7. If you then delete python 3.7 pkg will also ask you if it is 
> ok to delete all the py37-* ports.

There are many ports that depend on some specific Python version without
"py3" in their package names.

The following command lists all installed packages that depend on the
version of the python interpreter in the first column:

	pkg query "%dn %n-%v" | grep -E "^python3[0-9]+ "

Regards, STefan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f5929013-aaf6-5fdf-74dd-f0b9a9e9abac>