Re: Python version dependencies in pkg

From: Tatsuki Makino <>
Date: Mon, 10 Oct 2022 04:11:38 UTC
Shane Ambler wrote on 2022/10/10 12:04:
> On 8/10/22 3:06 pm, Tatsuki Makino wrote:
>> This is the behavior that causes the difference between USE_PYTHON=allflavors and -D BUILD_ALL_PYTHON_FLAVORS, which I am relentlessly :) repeating.
> Notice that valid python versions vary per port -
> % cd /usr/ports/math/py-numpy
> 3.9 3.8 3.7 3.10 3.11 2.7
> py-numpy has USES=python:3.8-3.10 which matches that valid list

No, no, no, no :)
math/py-numpy has USE_PYTHON=allflavors defined, so all FLAVORs from 3.8-3.10 are in FLAVORS.

> While -
> % cd /usr/ports/devel/py-six
> 3.9 3.8 3.7 3.10 3.11 2.7
(Slightly omitted)
> py38 py27 py39 py37 py310 py311
> py-six has USES=python:2.7+ so all versions are valid

My environment returns following.
I don't know when the porttree is from.
That is at least what I updated on portsnap after October 10, Japanese Standard Time (UTC+09:00). I can't touch it right now because I'm in a chromium build process :)

3.9 3.8 3.7 3.10 3.11 2.7

3.9 2.7 3.8 3.7 3.10 3.11
py39 py27

> If your FLAVORS list is shorter than that, maybe you have another
> setting in make.conf causing that. Try removing your make.conf and see
> if you get different values.

The narrowing down of FLAVORS to two is the behavior of Mk/Uses/ that I wrote about in my previous email.
When FLAVORS is three, If it is a mistake in the definition of DEFAULT_VERSIONS=python{,[23]}=, you may get a warning by the string written below.
And, as the warn message goes, "if you want more Python flavors, set BUILD_ALL_PYTHON_FLAVORS in your make.conf"
If all FLAVOR is visible, the following conditions will have been met

Or are there changes that are not included in the porttree I got from portsnap?