Skip to content

Commit

Permalink
Add sip and cpython as a build requirement
Browse files Browse the repository at this point in the history
Used in generating the code, bindings will
take place against the normal requirement.
This will probably mean, that cpython is build
twice. Against both profiles (host and debug)

Should fix Ultimaker/CuraEngine#1675

Contributes to CURA-9365
  • Loading branch information
[email protected] authored and jellespijker committed Jun 19, 2022
1 parent 9a94ffe commit f0dbd39
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 5 deletions.
53 changes: 49 additions & 4 deletions conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,60 @@ requirements:
- "protobuf/3.17.1"
requirements_pyarcus:
"None":
- "cpython/3.10.4"
- "cpython/3.10.4@ultimaker/testing"
- "zlib/1.2.12"
- "libffi/3.2.1"
- "mpdecimal/2.5.1@ultimaker/testing"
- "tcl/8.6.10@ultimaker/testing"
- "tk/8.6.10@ultimaker/testing"
"5.1.0":
- "cpython/3.10.4"
- "cpython/3.10.4@ultimaker/testing"
- "zlib/1.2.12"
- "libffi/3.2.1"
- "mpdecimal/2.5.1@ultimaker/testing"
- "tcl/8.6.10@ultimaker/testing"
- "tk/8.6.10@ultimaker/testing"
"5.1.0-beta":
- "cpython/3.10.4"
- "cpython/3.10.4@ultimaker/testing"
- "zlib/1.2.12"
- "libffi/3.2.1"
- "mpdecimal/2.5.1@ultimaker/testing"
- "tcl/8.6.10@ultimaker/testing"
- "tk/8.6.10@ultimaker/testing"
"5.1.0-cura_9365":
- "cpython/3.10.4"
- "cpython/3.10.4@ultimaker/testing"
- "zlib/1.2.12"
- "libffi/3.2.1"
- "mpdecimal/2.5.1@ultimaker/testing"
- "tcl/8.6.10@ultimaker/testing"
- "tk/8.6.10@ultimaker/testing"
build_requirements_pyarcus:
"None":
- "cpython/3.10.4@ultimaker/testing"
- "sip/6.5.1@ultimaker/testing"
- "libffi/3.2.1"
- "mpdecimal/2.5.1@ultimaker/testing"
- "tcl/8.6.10@ultimaker/testing"
- "tk/8.6.10@ultimaker/testing"
"5.1.0":
- "cpython/3.10.4@ultimaker/testing"
- "sip/6.5.1@ultimaker/testing"
- "libffi/3.2.1"
- "mpdecimal/2.5.1@ultimaker/testing"
- "tcl/8.6.10@ultimaker/testing"
- "tk/8.6.10@ultimaker/testing"
"5.1.0-beta":
- "cpython/3.10.4@ultimaker/testing"
- "sip/6.5.1@ultimaker/testing"
- "libffi/3.2.1"
- "mpdecimal/2.5.1@ultimaker/testing"
- "tcl/8.6.10@ultimaker/testing"
- "tk/8.6.10@ultimaker/testing"
"5.1.0-cura_9365":
- "cpython/3.10.4@ultimaker/testing"
- "sip/6.5.1@ultimaker/testing"
- "libffi/3.2.1"
- "mpdecimal/2.5.1@ultimaker/testing"
- "tcl/8.6.10@ultimaker/testing"
- "tk/8.6.10@ultimaker/testing"

12 changes: 11 additions & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ class ArcusConan(ConanFile):
"revision": "auto"
}

def build_requirements(self):
if self.options.build_python:
for req in self._um_data(self.version)["build_requirements_pyarcus"]:
self.tool_requires(req)

def requirements(self):
for req in self._um_data(self.version)["requirements"]:
self.requires(req)
Expand All @@ -52,7 +57,12 @@ def config_options(self):
del self.options.fPIC

def configure(self):
self.options["*"].shared = self.options.shared
self.options["*"].shared = True
if self.settings.os == "Windows":
# Needed to compile CPython on Windows with our configuration for Visual Studio
self.options["mpdecimal"].cxx = True
self.options["mpdecimal"].shared = False
self.options["libffi"].shared = False

def validate(self):
if self.settings.compiler.get_safe("cppstd"):
Expand Down

0 comments on commit f0dbd39

Please sign in to comment.