kliment / Printrun

Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software
GNU General Public License v3.0
2.35k stars 995 forks source link

Cannot build with Cython 3.0.0 #1370

Closed thijstriemstra closed 11 months ago

thijstriemstra commented 11 months ago
      Running command: build_others
      /home/workshop/.virtualenvs/pronterface/bin/python setup-wxsvg.py build_ext --inplace
      Compiling wx/svg/_nanosvg.pyx because it changed.
      [1/1] Cythonizing wx/svg/_nanosvg.pyx

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      for manipulating the SVG shape info in memory.
      """

      import sys

      cimport cython.object
              ^
      ------------------------------------------------------------

      wx/svg/_nanosvg.pyx:45:8: 'cython.object' is not a valid cython.* module
      Traceback (most recent call last):
        File "/tmp/pip-install-c4hnn0m9/wxpython_e233309b2d3e49c1a563d28e532eba1d/setup-wxsvg.py", line 54, in <module>
          modules = cythonize([module],
        File "/home/workshop/.virtualenvs/pronterface/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
          cythonize_one(*args)
        File "/home/workshop/.virtualenvs/pronterface/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: wx/svg/_nanosvg.pyx
      Command '/home/workshop/.virtualenvs/pronterface/bin/python setup-wxsvg.py build_ext --inplace' failed with exit code 1.
      Finished command: build_others (0m1.95s)
      Finished command: build_py (15m43.643s)
      Finished command: build (22m46.358s)
      Command '"/home/workshop/.virtualenvs/pronterface/bin/python" -u build.py build' failed with exit code 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for wxPython
  Running setup.py clean for wxPython
Failed to build wxPython
ERROR: Could not build wheels for wxPython, which is required to install pyproject.toml-based projects

pip install Cython==0.29.36 works:

Successfully installed appdirs-1.4.4 cairocffi-1.6.1 cairosvg-2.5.2 cffi-1.15.1 cssselect2-0.7.0 dbus-python-1.3.2 defusedxml-0.7.1 lxml-4.9.3 numpy-1.25.2 pillow-10.0.0 psutil-5.9.5 pycparser-2.21 pyglet-1.5.27 pyserial-3.5 six-1.16.0 tinycss2-1.2.1 webencodings-0.5.1 wxPython-4.2.1
rockstorm101 commented 11 months ago

Failed to build wxPython

I understand the problem is with the build of wxPython and not Printrun. Am I reading that right?

thijstriemstra commented 11 months ago

I'm not sure, if setup-wxsvg.py is part of wxPython, yes.

rockstorm101 commented 11 months ago

I will close this issue for now since it does not seem related to Printrun. Feel free to reopen it if (or when) Printrun fails to build under Cython 3+.