Ultimaker / Cura

3D printer / slicing GUI built on top of the Uranium framework
GNU Lesser General Public License v3.0
5.95k stars 2.04k forks source link

Cura build uses python syntax not compatible with listed Python version requirement #19252

Open pessimism opened 1 week ago

pessimism commented 1 week ago

Cura Version

5.7.2-RC2

Operating System

Oracle Linux 9

Printer

N/A

Reproduction steps

Follow build instructions here (I built and installed a standalone pyinstaller based copy of conan to my user's BIN directory): https://github.com/Ultimaker/Cura/wiki/Running-Cura-from-Source#system-requirements Linux Python requirement is listed as Python 3.6

Actual results

curaengine/5.7.2: Downloaded recipe revision 3e0bc2ee502545b9511ee74fc8a8746c ERROR: curaengine/5.7.2: Cannot load recipe. Error loading conanfile at '/home/steve/.conan/data/curaengine/5.7.2///export/conanfile.py': Unable to load conanfile in /home/steve/.conan/data/curaengine/5.7.2///export/conanfile.py File "", line 711, in _load File "", line 680, in _load_unlocked File "", line 846, in exec_module File "", line 983, in get_code File "", line 913, in source_to_code File "", line 228, in _call_with_framesremoved File "/home/steve/.conan/data/curaengine/5.7.2//_/export/conanfile.py", line 216 match self.settings.os: ^ SyntaxError: invalid syntax

This is due to use of the match keyword in Python 3 which is not introduced until Python 3.10. This breaks compatibility with Enterprise Linux distributions that ship Python 3.9.

Expected results

Cura builds and runs.

Add your .zip and screenshots here ⬇️

N/A

pessimism commented 1 week ago

Python 3.12 is available as an addon for OL9. Is there a way to pass an override to Conan to select a different python interpreter?