Bug 1807535 - qt5-qtwebkit requires Python 2 to build
Summary: qt5-qtwebkit requires Python 2 to build
Alias: None
Product: Fedora
Classification: Fedora
Component: qt5-qtwebkit
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: BRPY27
TreeView+ depends on / blocked
Reported: 2020-02-26 15:08 UTC by Petr Viktorin
Modified: 2020-04-24 16:17 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-24 16:17:04 UTC
Type: Bug

Attachments (Terms of Use)

Description Petr Viktorin 2020-02-26 15:08:31 UTC
Python 2 reached upstream end-of-life in January 2020. In Fedora Rawhide, it's now provided from the compat package `python27`.
Packages that only use Python 2 at build time, like qt5-qtwebkit, had a general exception to keep using it in Fedora 31. Now, the dependency should be removed.
Let us know if you need any help investigating or removing the dependency. (There are dozens of packages like this, so we didn't investigate this one thoroughly. We assume you know the package best.)

If it's possible that the dependency won't be removed in Fedora 33. Please request a FESCo exception. You can refer to the exception for mercurial as an example: https://pagure.io/fesco/issue/2243
It's good to mention:

- What is the reason for the Python 2 build dependency?

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

- What is the guidance for porting the build 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?)

If you need anything from us, or something is unclear, please mention it here.

Comment 1 Rex Dieter 2020-02-27 14:38:40 UTC
Naively attempting to use python3 fails,

[  4%] Generating ../../DerivedSources/JavaScriptCore/Bytecodes.h, ../../DerivedSources/JavaScriptCore/InitBytecodes.asm
cd /builddir/build/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore && /usr/bin/python /builddir/build/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/generate-bytecode-files --bytecodes_h /builddir/build/BUILD/qtwebkit-5.212.0-alpha3/DerivedSources/JavaScriptCore/Bytecodes.h --init_bytecodes_asm /builddir/build/BUILD/qtwebkit-5.212.0-alpha3/DerivedSources/JavaScriptCore/InitBytecodes.asm /builddir/build/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/bytecode/BytecodeList.json
make[2]: Leaving directory '/builddir/build/BUILD/qtwebkit-5.212.0-alpha3'
  File "/builddir/build/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/generate-bytecode-files", line 94
    print "I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)
SyntaxError: invalid syntax
make[2]: *** [Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/build.make:110: DerivedSources/JavaScriptCore/Bytecodes.h] Error 1
make[1]: *** [CMakeFiles/Makefile2:722: Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Context in Source/JavaScriptCore/generate-bytecode-files where the error occurs:

def openOrExit(path, mode):
        return open(path, mode)
    except IOError as e:
        print "I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)

Comment 2 Markus S. 2020-03-28 14:17:51 UTC
New upstream release is out that fixes that problem. Package has not been updated, yet.

Comment 3 Rex Dieter 2020-03-29 02:21:41 UTC
Thanks, trying out an alpha4 scratch build now.

Comment 4 Rex Dieter 2020-04-24 16:17:04 UTC
Package updated in rawhide, builds underway

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