Folks,
  an issue has come up recently that I don't understand.  This problem applies to both F31 and F32.

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:

gnomemodule.c:55:57: warning: passing argument 3 of 'PyDict_SetItemString' makes pointer from integer without a cast [-Wint-conversion]
   55 |     PyDict_SetItemString(dict, "POPT_CONTEXT_ARG_OPTS", PyInt_FromLong(POPT_CONTEXT_ARG_OPTS));
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                         |
      |                                                         int
In file included from /usr/include/python3.7m/Python.h:109,
                 from /usr/include/pygtk-2.0/pygobject.h:5,
                 from gnomemodule.c:8:


Note that despite having python set to python2 during the build it's pulling a file from python3 directory.  This same failure occurs now on F32 as well.  How can I get the compile to pull in python2 files?

[root@terrapin rpmbuild]# python -V
Python 2.7.18

The build is done:

rpmbuild -ba SPECS/gnome-python2.spec

This is dependent on also building pyorbit

rpmbuild -ba SPECS/pyorbit.spec

note that pyorbit will not build if python is python2, but will build if you use python3

It seems to me that the whole build setup for python2 is all messed up on both F31 and F32 and I don't know what I need to do to fix things so I can compile both pyorbit and
gnome-python2 with python set to python2.

Any help is appreciated.

Paolo