-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refer detection of the system's Python to a separate Conan package syspython, which lives in the tools/syspython directory. To use it, you need to export it once: conan export . tools/syspython This removes the custom discovery code of Python that existed in Lass' Conanfile, and that largely needed to be replicated by packages dependent on Lass. By moving the code to a separate package, we accomplish a couple of things: 1. We can easily reuse this in other projects 2. syspython can generate a PythonConfig.cmake that will be used instead of CMake's FindPython.cmake when calling find_package(Python). Instead of finding CMake's general Python module, it will find a Conan specific config. This allows us to: - Ensure CMake will use the exact Python target as defined by Conan - It allows us to *not* find debug libraries of Python if they are present on the system, if we wish to build a debug package against a release Python. The version of syspython is just 1.0.0, and not the Python version to be found, so that the version is indepedent of the system where it'll be used. I considered not hardcoding a version, and let the version be dependent of the Python version found, but then you would export it for the specific version by hand: conan export tools/syspython --version=3.11.6, which is inconvenient. The package ID is Python version specific though.
- Loading branch information
Showing
6 changed files
with
764 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build/ |
Oops, something went wrong.