-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add some extra text, update for 3.12 (#120)
Signed-off-by: Henry Schreiner <[email protected]>
- Loading branch information
Showing
7 changed files
with
81 additions
and
32 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
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 |
---|---|---|
|
@@ -140,3 +140,4 @@ dmypy.json | |
cython_debug/ | ||
|
||
_skbuild/ | ||
.pyodide-xbuildenv/ |
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 |
---|---|---|
@@ -1,15 +1,26 @@ | ||
cmake_minimum_required(VERSION 3.15...3.26) | ||
# Require CMake 3.15+ (matching scikit-build-core) Use new versions of all | ||
# policies up to CMake 3.27 | ||
cmake_minimum_required(VERSION 3.15...3.27) | ||
|
||
# Scikit-build-core sets these values for you, or you can just hard-code the | ||
# name and version. | ||
project( | ||
${SKBUILD_PROJECT_NAME} | ||
VERSION ${SKBUILD_PROJECT_VERSION} | ||
LANGUAGES CXX) | ||
|
||
# Find the module development requirements (requires FindPython from 3.17 or | ||
# scikit-build-core's built-in backport) | ||
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module) | ||
find_package(pybind11 CONFIG REQUIRED) | ||
|
||
# Add a library using FindPython's tooling (pybind11 also provides a helper like | ||
# this) | ||
python_add_library(_core MODULE src/main.cpp WITH_SOABI) | ||
target_link_libraries(_core PRIVATE pybind11::headers) | ||
|
||
# This is passing in the version as a define just as an example | ||
target_compile_definitions(_core PRIVATE VERSION_INFO=${PROJECT_VERSION}) | ||
|
||
# The install directory is the output (wheel) directory | ||
install(TARGETS _core DESTINATION scikit_build_example) |
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