After doing a little more investigation here's the issue. When rpmbuild
runs the compile phase it does the following:
./configure --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --program-prefix=
--disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib
--mandir=/usr/share/man --infodir=/usr/share/info --disable-static
When this completes every Makefile has this entry in it.
PYTHON = /usr/bin/python
PYTHON_CC = gcc -pthread
PYTHON_EMBED_LIBS = -L/usr/lib64 -lm -lpthread -ldl -lutil -lpython2.7
PYTHON_EXEC_PREFIX = ${exec_prefix}
PYTHON_INCLUDES = *-I/usr/include/python3.7m -I/usr/include/python3.7m*
PYTHON_LDFLAGS =
PYTHON_LIBS =
PYTHON_PLATFORM = linux2
PYTHON_PREFIX = ${prefix}
PYTHON_VERSION = 2.7
Note the PYTHON_INCLUDES entry. The problem is that on Jul 1 the
following program was added:
/usr/bin/python-config
The configure program has this code in it:
if test -x "$PYTHON-config"; then
PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
else
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
So on May 6 when I ran the rpmbuild the first time python-config did not
exist hence it dropped into the else case. In the else case
PYTHON_VERSION is determined by the output of
$PYTHON -c "import sys; print sys.version[:3]"
where PYTHON is python2. python-config is linked to python3-config.
There is a python2-config which is dated July 20. There is nothing
configured to use alternatives to switch between versions of
python-config as there is to switch between versions of python. One way
to fix this is for python-config to determine the version of python that
is currently active and then call the appropriate python*-config, since
there is a python3.7m-config. This way one doesn't have to remember to
go change the python-config link every time you change versions of python.
Paolo
On 8/13/20 11:18 AM, Felix Schwarz wrote:
Am 13.08.20 um 18:51 schrieb Paolo Galtieri:
Back in May I built several python2 packages that I needed to make sbackup
work on F32. sbackup is the python2 application I use to do daily backups.
The source packages I rebuilt are
gnome-python2-2.28.1-23.fc29.src.rpm
pyorbit-2.24.0-28.fc30.src.rpm
Back in May the packages built fine. I recently upgraded one system from F30
to F31, so I tried to rebuild the packages on F31. The build fails. Here is
one of the messages:
Not sure what you are actually doing but this works for me:
fedpkg clone --anonymous gnome-python2
cd gnome-python2
git checkout f31
fedpkg --release=f32 mockbuild
(same for pyorbit)
Besides that you should try to use sbackup with Python 3 somehow as it is
pretty likely that you won't be able to use the gnome/pyorbit libraries
anymore due to newer external dependencies in a few months/years.
Felix
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org