On 2.3.2018 11:54, Petr Viktorin wrote:
I like to use bconds, i.e. "%if %{with python2}". They're easy to override for local builds, allowing easy experimentation with, for example, dropping Python 2. I'd be happy if our official recommendation used bconds. If we want people to copy-paste something, let's make it good.

Also, "with_python2" is the current de-facto best practice. It's a good, descriptive name, and people are used to it. The "%if 0%{?py3_may}" is not as descriptive. If that is used throughout the specfile, people will need to know/read the docs – or just consider it magic.

So, I'd prefer adding macros that set "with_python2" bconds, and using that throughout the specfile.

For a more concrete idea, would something like this work? Naming to be bikeshedded of course.

# Build for python2 if it MUST be done
%py2_bcond_if required
# Build for python3 if it MAY be done
%py3_bcond_if available




%if %{with python2}
%if %{with python3}

That looks good!

(And some kind of %py_build_all and %py_install_all as the next baby step? Or am I reinventing a wheel with that line of thought?)

That would be awesome, but let's keep that for another discussion maybe?

Also, I'd like to do some wordsmithing on the proposal when the technicalities are sorted out, so the following is obvious to people who just skim it: - This new complexity is *only* meant for packagers who share specs across distros; others can stop reading now.
- FYI, we would love it if you dropped your py2 subpackage from Fedora.

Yes, yes!

Miro Hrončok
Phone: +420777974800
IRC: mhroncok
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org

Reply via email to