Bug 243034 - Mk/Uses/python.mk: WARNING when python version is set to non-default version in make.conf
Summary: Mk/Uses/python.mk: WARNING when python version is set to non-default version ...
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-python (Nobody)
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2020-01-02 09:55 UTC by schmidt
Modified: 2020-01-02 14:38 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback? (bdrewery)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description schmidt 2020-01-02 09:55:09 UTC
Hi

I have DEFAULT_VERSIONS=  python=3.6 in my make.conf and get 

/!\ WARNING /!\                                                                                          

PYTHON_DEFAULT must be a version present in PYTHON2_DEFAULT or PYTHON3_DEFAULT,                          if you want more Python flavors, set BUILD_ALL_PYTHON_FLAVORS in your make.conf                          

Every time i try to build a python port. 

Why can't a select a different version as default then the default versions of python2 or python3
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-02 10:04:36 UTC
Hi schmidt, thank you for your report

The mechanism unfortunately landed in opt-out instead of opt-in form when it was first committed, which had the benefit of not requiring our official build cluster (using poudriere) not having to do anything special in order to only build 2 default versions.

This unfortunately had the impact of everyone else to do something specific that was not necessary prior to the mechanism landing in that form.

We'll need to coordinate with poudriere developers to make sure something is in place for poudriere users, and our build cluster before changing the current behaviour, so that the present behaviour is maintained in that (package building) environment.
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2020-01-02 10:07:58 UTC
This is intended.

If you want to use python 3.6 as default,  set DEFAULT_VERSIONS=  python=3.6 python3=3.6
Comment 3 schmidt 2020-01-02 13:36:05 UTC
Really? this is how it's intended? 

sorry I don't understand this warning at all. It works perfectly. Why the warning. What's the benefit of this warning. It's just annoying. 

I don't want to build any flavors, i just want to specify which version should be used as the DEFAULT_VERSIONS was intended.
Comment 4 Antoine Brodin freebsd_committer freebsd_triage 2020-01-02 14:38:37 UTC
This is intended.

The default version of python is 3.7,  not 3.6 so default versions of python and python3 contradict themselves in your case.

You have to use:

DEFAULT_VERSIONS= python=3.6 python3=3.6