Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxPython 4.2.1 build failed with cython 3.0.8 and sip 6.8.1 #2514

Open
JohnPritchard opened this issue Jan 12, 2024 · 3 comments
Open

wxPython 4.2.1 build failed with cython 3.0.8 and sip 6.8.1 #2514

JohnPritchard opened this issue Jan 12, 2024 · 3 comments

Comments

@JohnPritchard
Copy link

I'm getting the same problem as reported in #2439, building in MacPorts, with the following versions:

wxpython @4.2.1
sip @6.8.1
cython @3.0.8

I get this for python 3.9.18, 3.10.13 & 3.11.7

This probably stopped working in MacPorts ~2 weeks ago (23/12/2023) when the cython version (in MacPorts) was upgraded from 0.29.36 to 3.0.7. Building wxpython also failed against python 3.0.7. The python version in MacPorts was upgraded from 3.0.7 to 3.0.8 yesterday (11/01/2024).

Note, although in MacPorts the source tgz (of wxpython) is (typically) not downloaded directly from PyPI, the sha256 checksum of the MacPorts and the PyPI source tgz's are identical, so it is the same source as provided by PyPI.

@JohnPritchard
Copy link
Author

JohnPritchard commented Jan 12, 2024

For the record, the build error is:

:info:build Waf: Entering directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-wxpython-4.0/py39-wxpython-4.0/work/wxPython-4.2.1/build/waf/3.9'
:info:build **** Compiler: /usr/bin/clang --version
:info:build Apple clang version 15.0.0 (clang-1500.1.0.2.5)
:info:build Target: arm64-apple-darwin23.2.0
:info:build Thread model: posix
:info:build InstalledDir: /Library/Developer/CommandLineTools/usr/bin
:info:build Waf: Leaving directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-wxpython-4.0/py39-wxpython-4.0/work/wxPython-4.2.1/build/waf/3.9'
:info:build 'build' finished successfully (2.274s)
:info:build Compiling wx/svg/_nanosvg.pyx because it changed.
:info:build [1/1] Cythonizing wx/svg/_nanosvg.pyx
:info:build Error compiling Cython file:
:info:build ------------------------------------------------------------
:info:build ...
:info:build for manipulating the SVG shape info in memory.
:info:build """
:info:build import sys
:info:build cimport cython.object
:info:build ^
:info:build ------------------------------------------------------------
:info:build wx/svg/_nanosvg.pyx:45:8: 'cython.object' is not a valid cython.* module
:info:build Traceback (most recent call last):
:info:build File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-wxpython-4.0/py39-wxpython-4.0/work/wxPython-4.2.1/setup-wxsvg.py", line 54, in
:info:build modules = cythonize([module],
:info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
:info:build cythonize_one(*args)
:info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
:info:build raise CompileError(None, pyx_file)
:info:build Cython.Compiler.Errors.CompileError: wx/svg/_nanosvg.pyx

@swt2c
Copy link
Collaborator

swt2c commented Jan 12, 2024

Yes, the fix isn't in wxPython 4.2.1. You either need to pick up this patch: aeb557d or use Cython < 3 as a workaround for now.

@JohnPritchard
Copy link
Author

Great! Thanks for the pointer. I will try out applying the patch, and if that works ask the MacPorts maintainer to officially add the patch to the MacPorts build.

ryandesign added a commit to macports/macports-ports that referenced this issue Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants