Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion extensions/generators/VirtualPythonEnv.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,26 @@ def _populate_pip_requirements(conanfile, suffix, actual_os, requirements_summar

if hasattr(conanfile, "conan_data") and conanfile.conan_data is not None and data_key in conanfile.conan_data:
pip_requirements_data = conanfile.conan_data[data_key]
for system in (system for system in pip_requirements_data if system in ("any_os", actual_os)):

# Build list of applicable system keys: any_os, OS name, and OS_architecture combinations
actual_arch = str(conanfile.settings.arch) if hasattr(conanfile.settings, "arch") else None
system_keys = ["any_os", actual_os]

# Add architecture-specific keys (e.g., "Windows_x64", "Linux_x86_64")
if actual_arch:
# Map Conan architecture names to common naming conventions
arch_mapping = {
"x86_64": "x64",
"armv8": "arm64",
"armv8_32": "arm",
}
normalized_arch = arch_mapping.get(actual_arch, actual_arch)
system_keys.append(f"{actual_os}_{normalized_arch}")
# Also try with original arch name
if normalized_arch != actual_arch:
system_keys.append(f"{actual_os}_{actual_arch}")

for system in (system for system in pip_requirements_data if system in system_keys):
for package_name, package_desc in pip_requirements_data[system].items():

try:
Expand Down
8 changes: 8 additions & 0 deletions profiles/cura.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,11 @@ dulcificum/*:shared=False
dulcificum/*:shared=True
{% endif %}
clipper/*:shared=True
{% if platform.system() == 'Windows' and platform.machine() in ['arm64', 'aarch64', 'ARM64'] %}
# ARM64 Windows: CPython requires mpdecimal as shared library
mpdecimal/*:shared=True
# ARM64 Windows: Arcus needs to be shared for proper Python binding
arcus/*:shared=True
# ARM64 Windows: Disable tbbproxy (not available on ARM64 platforms)
onetbb/*:tbbproxy=False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just saw a conanfile.py in an other repository, that did the same locally, so since this is global, maybe the other one is no more required ? I can't find it though 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one you mean?

https://github.com/Ultimaker/CuraEngine/pull/2264/files#diff-63f09721ade419d29886e8190ffa3c9c756baa9bef8802a7f2aeabf3b545164fR98

So in my head it makes more sense to have it in the conan-config. So the one in the engine is a backup in case this one does not work as expected. I can make the builds based on changes on CuraEngine branches but making builds with different conan-config branches is much more difficult.
As part of the clean up probably one of the two will be yeeted out for the final version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes some sense. I think I remember some good practices I learned during the conan2 migration, and one of them was to put as many of those things in profiles as possible, so that when you install dependencies of any sub-project, you get the same global configuration and that avoids conflicts. By putting it only in the conanfile of a single project, you can easily end-up with multiple projects requiring different versions/settings of the same dependency. In this case, the setting change is really specific to an architecture so having it in a profile fully makes sense. CuraEngine only specifies that it requires OneTBB, and the profile indicates that it should be setup in a specific way, whenever it is for CuraEngine or anyone else (for example if we some day use it on libuvula).

{% endif %}