After application of patches described in Making sudo pip safe Fedora Change [0], unexpected issues in packages using non-standard build methods/scripts appeared. We received bug reports for DNF [1] and Anaconda [2].
We decided to temporarily revert the main patch last Friday (2017-02-24) to prevent build failures and anaconda crashes while we investigate what will need to change.
To simplify, the main reason for the build failures is that some packages use /usr/bin/python3 (or $PATH/python3) instead of %{__python3} when building RPMs. It's not always trivial to fix this in build systems that hardcode assumptions about where the python3 binary is.
I collected some data to have an idea how many packages are affected. The total number of Python 3 packages in Fedora according Fedora Porting Database [3] is 1837.
The most frequently used alternative build tools for Python packages are CMake (28 packages) and Autotools (133 packages). 8 out of 28 packages using CMake fail to build in Copr [4] as well as 12 out of 133 packages using Autotools [5].
These build tools need to be configured to use %{__python3} during rpm build. There are also some custom build scripts not following best practices and hardcoding the path to the python executable or to python site-packages. Specific fixes will have to be done in these cases.
We'll meet with Anaconda developers to discuss the problem.
[0] https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe?rd=User:Torsava/... [1] https://bugzilla.redhat.com/show_bug.cgi?id=1426435 [2] https://bugzilla.redhat.com/show_bug.cgi?id=1425827 [3] http://fedora.portingdb.xyz/ [4] https://copr.fedorainfracloud.org/coprs/mcyprian/cmake-pkgs/builds/ [5] https://copr.fedorainfracloud.org/coprs/mcyprian/autotools-pkgs/builds/
Michal Cyprian
python-devel@lists.fedoraproject.org