Bug 1789646 - python-wxpython4 fails to build with Python 3.9
Summary: python-wxpython4 fails to build with Python 3.9
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-wxpython4
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Scott Talbert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-01-10 00:56 UTC by Charalampos Stratakis
Modified: 2020-01-12 23:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-12 23:13:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Charalampos Stratakis 2020-01-10 00:56:32 UTC
python-wxpython4 fails to build with Python 3.9.0a2.

Traceback (most recent call last):
  File "/builddir/build/BUILD/wxPython-4.0.7/bin/.waf3-2.0.8-206f2b7a89029e71942a2beb9e1bbbbd/waflib/Scripting.py", line 101, in waf_entry_point
    set_main_module(os.path.normpath(os.path.join(Context.run_dir,Context.WSCRIPT_FILE)))
  File "/builddir/build/BUILD/wxPython-4.0.7/bin/.waf3-2.0.8-206f2b7a89029e71942a2beb9e1bbbbd/waflib/Scripting.py", line 141, in set_main_module
    Context.g_module=Context.load_module(file_path)
  File "/builddir/build/BUILD/wxPython-4.0.7/bin/.waf3-2.0.8-206f2b7a89029e71942a2beb9e1bbbbd/waflib/Context.py", line 349, in load_module
    code=Utils.readf(path,m='rU',encoding=encoding)
  File "/builddir/build/BUILD/wxPython-4.0.7/bin/.waf3-2.0.8-206f2b7a89029e71942a2beb9e1bbbbd/waflib/Utils.py", line 141, in readf
    with open(fname,m)as f:
ValueError: invalid mode: 'rUb'

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01142521-python-wxpython4/

For all our attempts to build python-wxpython4 with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-wxpython4/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33, but the initial bootstrapping has already started.
A build failure this early in the bootstrap sequence blocks us very much.

Comment 1 Charalampos Stratakis 2020-01-10 00:57:31 UTC
This seems to be due to 'U' mode being removed from Python 3.9:

https://bugs.python.org/issue37330

Comment 2 Charalampos Stratakis 2020-01-10 01:14:38 UTC
Also it has been fixed on waf upstream: https://gitlab.com/ita1024/waf/commit/68997828c850ce7fb30b73b4adfde35053e539d1

Comment 3 Charalampos Stratakis 2020-01-10 02:04:32 UTC
Managed to workaround the issue by downloading the latest waf executable (2.0.19) and placing it in dist-git as Source1. Then copying it to the bin folder of wxPython and removing the old version. And then did this change in the source code and it built fine:

diff --git a/build.py b/build.py
index 55184814..c9632c0b 100755
--- a/build.py
+++ b/build.py
@@ -95,8 +95,8 @@ sipMD5 = {
     'linux64'  : 'e8566e05d2122344ec7ce0e289877f74',
 }
 
-wafCurrentVersion = '2.0.8'
-wafMD5 = 'bc393f29337cd00aef25d54280ca22e1'
+wafCurrentVersion = '2.0.19'
+wafMD5 = 'ac362b60111a59ab2df63513018d5ad8'
 
 doxygenCurrentVersion = '1.8.8'
 doxygenMD5 = {


Although admittedly it would be better if wxpython would buildrequire and use the waf rpm instead of a bundled copy.

Comment 4 Scott Talbert 2020-01-10 15:01:04 UTC
Thanks, waf upstream tends to be hostile against distribution packages, but maybe I'll give it a try.

Comment 5 Scott Talbert 2020-01-11 02:23:41 UTC
I'm going to try building with the waf rpm instead of the bundled copy.  Can you build waf in the Python 3.9 copr?

Comment 6 Miro Hrončok 2020-01-12 19:21:04 UTC
Trying a build. https://copr.fedorainfracloud.org/coprs/build/1143599

Not sure if it won't need updating.

Comment 7 Miro Hrončok 2020-01-12 19:26:46 UTC
You got it in there.

Comment 8 Miro Hrončok 2020-01-12 23:42:12 UTC
Thanks. Building in: https://copr.fedorainfracloud.org/coprs/build/1143671


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