Use Conan CPython package

Now all our deps are compiled with the same flags.
This should help to make it more agnostic over the
systems.

Contributes to CURA-9365
This commit is contained in:
j.spijker@ultimaker.com 2022-06-18 16:44:07 +02:00 committed by jspijker
parent dce96a6abd
commit ac6f939db3
2 changed files with 4 additions and 7 deletions

View file

@ -7,6 +7,7 @@ requirements:
- "uranium/(latest)@ultimaker/stable" - "uranium/(latest)@ultimaker/stable"
- "fdm_materials/(latest)@ultimaker/stable" - "fdm_materials/(latest)@ultimaker/stable"
- "cura_binary_data/(latest)@ultimaker/stable" - "cura_binary_data/(latest)@ultimaker/stable"
- "cpython/3.10.4@ultimaker/testing"
"5.1.0": "5.1.0":
- "arcus/5.1.0" - "arcus/5.1.0"
- "curaengine/5.1.0" - "curaengine/5.1.0"
@ -15,6 +16,7 @@ requirements:
- "uranium/5.1.0" - "uranium/5.1.0"
- "fdm_materials/5.1.0" - "fdm_materials/5.1.0"
- "cura_binary_data/5.1.0" - "cura_binary_data/5.1.0"
- "cpython/3.10.4@ultimaker/testing"
"5.1.0-beta": "5.1.0-beta":
- "arcus/[5.1.0-beta]@ultimaker/stable" - "arcus/[5.1.0-beta]@ultimaker/stable"
- "curaengine/[5.1.0-beta]@ultimaker/stable" - "curaengine/[5.1.0-beta]@ultimaker/stable"
@ -23,6 +25,7 @@ requirements:
- "uranium/[5.1.0-beta]@ultimaker/stable" - "uranium/[5.1.0-beta]@ultimaker/stable"
- "fdm_materials/[5.1.0-beta]@ultimaker/stable" - "fdm_materials/[5.1.0-beta]@ultimaker/stable"
- "cura_binary_data/[5.1.0-beta]@ultimaker/stable" - "cura_binary_data/[5.1.0-beta]@ultimaker/stable"
- "cpython/3.10.4@ultimaker/testing"
"5.1.0-cura_9365": "5.1.0-cura_9365":
- "arcus/[5.1.0-cura_9365]@ultimaker/testing" - "arcus/[5.1.0-cura_9365]@ultimaker/testing"
- "curaengine/[5.1.0-cura_9365]@ultimaker/testing" - "curaengine/[5.1.0-cura_9365]@ultimaker/testing"
@ -31,6 +34,7 @@ requirements:
- "uranium/[5.1.0-cura_9365]@ultimaker/testing" - "uranium/[5.1.0-cura_9365]@ultimaker/testing"
- "fdm_materials/[5.1.0-cura_9365]@ultimaker/testing" - "fdm_materials/[5.1.0-cura_9365]@ultimaker/testing"
- "cura_binary_data/[5.1.0-cura_9365]@ultimaker/testing" - "cura_binary_data/[5.1.0-cura_9365]@ultimaker/testing"
- "cpython/3.10.4@ultimaker/testing"
runinfo: runinfo:
"None": "None":
entrypoint: "cura_app.py" entrypoint: "cura_app.py"

View file

@ -31,7 +31,6 @@ class CuraConan(ConanFile):
python_requires_extend = "umbase.UMBaseConanfile" python_requires_extend = "umbase.UMBaseConanfile"
options = { options = {
"python_version": "ANY",
"enterprise": ["True", "False", "true", "false"], # Workaround for GH Action passing boolean as lowercase string "enterprise": ["True", "False", "true", "false"], # Workaround for GH Action passing boolean as lowercase string
"staging": ["True", "False", "true", "false"], # Workaround for GH Action passing boolean as lowercase string "staging": ["True", "False", "true", "false"], # Workaround for GH Action passing boolean as lowercase string
"devtools": [True, False], # FIXME: Split this up in testing and (development / build (pyinstaller) / system installer) tools "devtools": [True, False], # FIXME: Split this up in testing and (development / build (pyinstaller) / system installer) tools
@ -40,7 +39,6 @@ class CuraConan(ConanFile):
"cura_debug_mode": [True, False] # FIXME: Use profiles "cura_debug_mode": [True, False] # FIXME: Use profiles
} }
default_options = { default_options = {
"python_version": "system",
"enterprise": "False", "enterprise": "False",
"staging": "False", "staging": "False",
"devtools": False, "devtools": False,
@ -85,13 +83,8 @@ class CuraConan(ConanFile):
return ["requirements.txt", "requirements-ultimaker.txt", "requirements-dev.txt"] return ["requirements.txt", "requirements-ultimaker.txt", "requirements-dev.txt"]
return ["requirements.txt", "requirements-ultimaker.txt"] return ["requirements.txt", "requirements-ultimaker.txt"]
def config_options(self):
if self.options.python_version == "system":
self.options.python_version = python_version()
def configure(self): def configure(self):
self.options["*"].shared = True self.options["*"].shared = True
self.options["*"].python_version = self.options.python_version
def validate(self): def validate(self):
if self.version and tools.Version(self.version) <= tools.Version("4"): if self.version and tools.Version(self.version) <= tools.Version("4"):