Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1738033 - kig depends on Python 2
Summary: kig depends on Python 2
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kig
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Kofler
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F31_PY2REMOVAL
TreeView+ depends on / blocked
 
Reported: 2019-08-06 12:35 UTC by Lumír Balhar
Modified: 2019-10-29 14:46 UTC (History)
6 users (show)

Fixed In Version: kig-19.08.1-3.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-29 14:45:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lumír Balhar 2019-08-06 12:35:54 UTC
Python 2.7 will reach end-of-life in January 2020, over 9 years after it was released. This falls within the Fedora 31 lifetime.
Packages that depend on Python 2 are being switched to Python 3 or removed from Fedora: https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages
Python 2 will be retired in Fedora 32: https://fedoraproject.org/wiki/Changes/RetirePython2

To help planning, we'd like to know the plans for kig's future. Specifically:


- What is the reason for the Python2 dependency? (Is it software written in Python, or does it just provide Python bindings, or use Python in the build system or test runner?) 

- What are the upstream/community plans/timelines regarding Python 3?

- What is the guidance for porting to Python 3? (Assuming that there is someone who generally knows how to port to Python 3, but doesn't know anything about the particular package, what are the next steps to take?)


This bug is filed semi-automatically, and might not have all the context specific to kig.
If you need anything from us, or something is unclear, please mention it here.

Thank you.

Comment 1 Ben Cotton 2019-08-13 17:08:37 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 2 Ben Cotton 2019-08-13 17:45:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 3 Lumír Balhar 2019-08-14 08:29:29 UTC
Please answer the above questions. If you don't the package can be orphaned: https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages

If you need any information or help, please let us know.

Comment 4 Lumír Balhar 2019-08-21 13:34:01 UTC
Please answer the above questions. If you don't, the package can be orphaned: https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages

If you need any information or help, or if you need some more time, please let us know.

Comment 5 Lumír Balhar 2019-08-29 05:36:07 UTC
Please answer the above questions. If you don't, the package can be orphaned: https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages

If you need any information or help, or if you need some more time, please let us know.

Comment 6 Miro Hrončok 2019-09-05 10:41:39 UTC
According to the procedure described in https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages the package was now orphaned. If you think it was a mistake, you can provide the answers and claim the package back.

Let us know if you need any help or just need more time.

Comment 7 Rex Dieter 2019-09-05 20:06:25 UTC
This is only a runtime dependency on python2 interpreter, so will request exception.

Comment 8 Rex Dieter 2019-09-05 20:09:54 UTC
I guess there's also boost-python to consider (but apparently that support is broken and fails to detect properly at the moment).

Comment 9 Kevin Kofler 2019-09-10 01:03:33 UTC
It looks like OpenMandriva has this building with Python 3:
https://github.com/OpenMandrivaAssociation/kig/commit/b7090845374eaae266e1a1648dd030ee5585573d

(Their default boost-python-devel is actually the Python 3 one now, see https://github.com/OpenMandrivaAssociation/boost/blob/master/boost.spec#L310 .)

Comment 10 Kevin Kofler 2019-09-10 01:16:52 UTC
That said, I suspect more changes than their one-line patch are needed for it to actually WORK.

Comment 11 Miro Hrončok 2019-10-17 11:10:29 UTC
Automation has figured out the package is retired in rawhide.

If you like it to be unretired, please open a ticket at https://pagure.io/releng/new_issue?template=package_unretirement

Comment 12 Kevin Kofler 2019-10-17 23:47:40 UTC
https://pagure.io/releng/issue/8912

Comment 13 Miro Hrončok 2019-10-20 11:59:48 UTC
Oh. Sorry for this. I've never seen the comment here and the package was never unorphaned after the initial orphaning.

Let me know if you would like us to explore the code or test kig on python3 with the one line patch.

Comment 14 Lumír Balhar 2019-10-29 12:42:53 UTC
Anything new here? Do you need any help from us?

Comment 15 Kevin Kofler 2019-10-29 12:52:21 UTC
Upstream now has a patch which is like the OpenMandriva one-line patch, but with conditionals:
https://cgit.kde.org/kig.git/commit/?id=c0aa768f28219ce8b3c275a6d13ad69757e3c7af

I can try the upstream patch. I just wonder how well it will actually work.

Comment 16 Kevin Kofler 2019-10-29 13:09:53 UTC
I'm trying to build the patch in Rawhide now.

Comment 17 Kevin Kofler 2019-10-29 13:43:00 UTC
The funny thing is, Kig has actually not been built with Python support at all since Fedora 30. Some python2 BuildRequires were left over, but not actually used because the boost-python2-devel BuildRequires was disabled due to an issue with FindBoostPython.cmake. I am now trying to work around that issue to actually get a build with Python 3 support.

Comment 18 Kevin Kofler 2019-10-29 14:14:36 UTC
Where I am stuck now is:
https://kojipkgs.fedoraproject.org/work/tasks/5483/38645483/build.log

[ 97%] Building CXX object CMakeFiles/kigpart.dir/scripting/python_scripter.cc.o
/usr/bin/c++  -DKCOREADDONS_LIB -DKIG_ENABLE_PYTHON_SCRIPTING -DLIB_PYTHON=\"libpython3.8m.so\" -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_WIDGETS_LIB -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DWITH_GEOGEBRA=1 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -Dkigpart_EXPORTS -I/builddir/build/BUILD/kig-19.08.1/x86_64-redhat-linux-gnu -I/builddir/build/BUILD/kig-19.08.1 -I/builddir/build/BUILD/kig-19.08.1/x86_64-redhat-linux-gnu/kigpart_autogen/include -I/builddir/build/BUILD/kig-19.08.1/modes -I/usr/include/python3.8m -I/usr/include/boost -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtPrintSupport -isystem /usr/include/KF5/KCrash -isystem /usr/include/KF5 -isystem /usr/include/KF5/KParts -isystem /usr/include/KF5/KIOWidgets -isystem /usr/include/KF5/KIOCore -isystem /usr/include/KF5/KCoreAddons -isystem /usr/include/KF5/KService -isystem /usr/include/KF5/KConfigCore -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtDBus -isystem /usr/include/KF5/KJobWidgets -isystem /usr/include/KF5/KCompletion -isystem /usr/include/KF5/KWidgetsAddons -isystem /usr/include/KF5/KXmlGui -isystem /usr/include/qt5/QtXml -isystem /usr/include/KF5/KConfigWidgets -isystem /usr/include/KF5/KCodecs -isystem /usr/include/KF5/KConfigGui -isystem /usr/include/KF5/KAuth -isystem /usr/include/KF5/KTextWidgets -isystem /usr/include/KF5/SonnetUi -isystem /usr/include/KF5/KI18n -isystem /usr/include/KF5/KTextEditor -isystem /usr/include/KF5/KIconThemes -isystem /usr/include/KF5/KArchive -isystem /usr/include/qt5/QtXmlPatterns  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -std=c++0x -fno-operator-names -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -std=c++11 -fexceptions -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden   -fPIC -fexceptions -o CMakeFiles/kigpart.dir/scripting/python_scripter.cc.o -c /builddir/build/BUILD/kig-19.08.1/scripting/python_scripter.cc
/builddir/build/BUILD/kig-19.08.1/scripting/python_scripter.cc:23:10: fatal error: Python.h: No such file or directory
   23 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.

This has -I/usr/include/python3.8m but it still cannot find <Python.h>. It might need -isystem instead, but it is CMake which decides what to put under -I and what under -isystem.

Comment 19 Kevin Kofler 2019-10-29 14:22:47 UTC
Ah, actually, the issue is that the naming changed from 3.7m to just 3.8.

Comment 20 Miro Hrončok 2019-10-29 14:36:05 UTC
Where is the "m" coming from? is it hardcoded somewhere?

This will get the include flag(s):

$ python3-config --includes

Comment 21 Kevin Kofler 2019-10-29 14:42:52 UTC
I was hardcoding it, because the Find*.cmake files are not doing the right thing.

I'm trying these now:
%global _python3_include %(%{__python3} -Ic "from distutils.sysconfig import get_python_inc; print(get_python_inc())")
%global _python3_lib %{_libdir}/lib%(basename %{_python3_include}).so

Comment 22 Kevin Kofler 2019-10-29 14:45:48 UTC
Yep, that works.

kig-19.08.1-3.fc32 is now built with working Python 3 support and all Python 2 dependencies should be gone.


Note You need to log in before you can comment on or make changes to this bug.