mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-23 23:38:59 +08:00
[nanobind]update to 2.2.0 (#41829)
This commit is contained in:
parent
2e6c6081a8
commit
ea31daa4ca
@ -1,62 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 919ce1d..25956c7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -107,29 +107,11 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
|
||||
add_compile_options(-Wall -Wextra -Wno-unused-local-typedefs)
|
||||
endif()
|
||||
|
||||
-# ---------------------------------------------------------------------------
|
||||
-# Find the Python interpreter and development libraries
|
||||
-# ---------------------------------------------------------------------------
|
||||
-
|
||||
-if (NOT TARGET Python::Module OR NOT TARGET Python::Interpreter)
|
||||
- set(Python_FIND_FRAMEWORK LAST) # Prefer Brew/Conda to Apple framework python
|
||||
-
|
||||
- if (CMAKE_VERSION VERSION_LESS 3.18)
|
||||
- set(NB_PYTHON_DEV_MODULE Development)
|
||||
- else()
|
||||
- set(NB_PYTHON_DEV_MODULE Development.Module)
|
||||
- endif()
|
||||
-
|
||||
- find_package(Python 3.8
|
||||
- REQUIRED COMPONENTS Interpreter ${NB_PYTHON_DEV_MODULE}
|
||||
- OPTIONAL_COMPONENTS Development.SABIModule)
|
||||
-endif()
|
||||
-
|
||||
# ---------------------------------------------------------------------------
|
||||
# Include nanobind cmake functionality
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
-find_package(nanobind
|
||||
+find_package(nanobind REQUIRED
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/cmake
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
diff --git a/cmake/nanobind-config.cmake b/cmake/nanobind-config.cmake
|
||||
index cb6cfb0..a456f3f 100644
|
||||
--- a/cmake/nanobind-config.cmake
|
||||
+++ b/cmake/nanobind-config.cmake
|
||||
@@ -1,9 +1,20 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
-if (NOT TARGET Python::Module)
|
||||
- message(FATAL_ERROR "You must invoke 'find_package(Python COMPONENTS Interpreter Development REQUIRED)' prior to including nanobind.")
|
||||
+# ---------------------------------------------------------------------------
|
||||
+# Find the Python interpreter and development libraries
|
||||
+# ---------------------------------------------------------------------------
|
||||
+if (CMAKE_VERSION VERSION_LESS 3.18)
|
||||
+ set(NB_PYTHON_DEV_MODULE Development)
|
||||
+else()
|
||||
+ set(NB_PYTHON_DEV_MODULE Development.Module)
|
||||
endif()
|
||||
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(Python 3.8
|
||||
+ COMPONENTS Interpreter ${NB_PYTHON_DEV_MODULE}
|
||||
+ OPTIONAL_COMPONENTS Development.SABIModule
|
||||
+)
|
||||
+
|
||||
# Determine the right suffix for ordinary and stable ABI extensions.
|
||||
|
||||
# We always need to know the extension
|
@ -1,129 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e8fda9f..b27dc07 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -52,7 +52,7 @@ if(NB_CREATE_INSTALL_RULES AND NOT CMAKE_SKIP_INSTALL_RULES)
|
||||
|
||||
# Normally these would be configurable by the user, but we can't allow that
|
||||
# because the lookup paths are hard-coded in 'cmake/nanobind-config.cmake'
|
||||
- set(NB_INSTALL_INC_DIR "${NB_INSTALL_DATADIR}/include")
|
||||
+ set(NB_INSTALL_INC_DIR "${NB_INSTALL_DATADIR}/../../include")
|
||||
set(NB_INSTALL_SRC_DIR "${NB_INSTALL_DATADIR}/src")
|
||||
set(NB_INSTALL_EXT_DIR "${NB_INSTALL_DATADIR}/ext")
|
||||
set(NB_INSTALL_MODULE_DIR "${NB_INSTALL_DATADIR}")
|
||||
diff --git a/cmake/nanobind-config.cmake b/cmake/nanobind-config.cmake
|
||||
index a456f3f..92406dc 100644
|
||||
--- a/cmake/nanobind-config.cmake
|
||||
+++ b/cmake/nanobind-config.cmake
|
||||
@@ -113,54 +113,54 @@ function (nanobind_build_library TARGET_NAME)
|
||||
|
||||
add_library(${TARGET_NAME} ${TARGET_TYPE}
|
||||
EXCLUDE_FROM_ALL
|
||||
- ${NB_DIR}/include/nanobind/make_iterator.h
|
||||
- ${NB_DIR}/include/nanobind/nanobind.h
|
||||
- ${NB_DIR}/include/nanobind/nb_accessor.h
|
||||
- ${NB_DIR}/include/nanobind/nb_attr.h
|
||||
- ${NB_DIR}/include/nanobind/nb_call.h
|
||||
- ${NB_DIR}/include/nanobind/nb_cast.h
|
||||
- ${NB_DIR}/include/nanobind/nb_class.h
|
||||
- ${NB_DIR}/include/nanobind/nb_defs.h
|
||||
- ${NB_DIR}/include/nanobind/nb_descr.h
|
||||
- ${NB_DIR}/include/nanobind/nb_enums.h
|
||||
- ${NB_DIR}/include/nanobind/nb_error.h
|
||||
- ${NB_DIR}/include/nanobind/nb_func.h
|
||||
- ${NB_DIR}/include/nanobind/nb_lib.h
|
||||
- ${NB_DIR}/include/nanobind/nb_misc.h
|
||||
- ${NB_DIR}/include/nanobind/nb_python.h
|
||||
- ${NB_DIR}/include/nanobind/nb_traits.h
|
||||
- ${NB_DIR}/include/nanobind/nb_tuple.h
|
||||
- ${NB_DIR}/include/nanobind/nb_types.h
|
||||
- ${NB_DIR}/include/nanobind/ndarray.h
|
||||
- ${NB_DIR}/include/nanobind/trampoline.h
|
||||
- ${NB_DIR}/include/nanobind/operators.h
|
||||
- ${NB_DIR}/include/nanobind/stl/array.h
|
||||
- ${NB_DIR}/include/nanobind/stl/bind_map.h
|
||||
- ${NB_DIR}/include/nanobind/stl/bind_vector.h
|
||||
- ${NB_DIR}/include/nanobind/stl/detail
|
||||
- ${NB_DIR}/include/nanobind/stl/detail/nb_array.h
|
||||
- ${NB_DIR}/include/nanobind/stl/detail/nb_dict.h
|
||||
- ${NB_DIR}/include/nanobind/stl/detail/nb_list.h
|
||||
- ${NB_DIR}/include/nanobind/stl/detail/nb_set.h
|
||||
- ${NB_DIR}/include/nanobind/stl/detail/traits.h
|
||||
- ${NB_DIR}/include/nanobind/stl/filesystem.h
|
||||
- ${NB_DIR}/include/nanobind/stl/function.h
|
||||
- ${NB_DIR}/include/nanobind/stl/list.h
|
||||
- ${NB_DIR}/include/nanobind/stl/map.h
|
||||
- ${NB_DIR}/include/nanobind/stl/optional.h
|
||||
- ${NB_DIR}/include/nanobind/stl/pair.h
|
||||
- ${NB_DIR}/include/nanobind/stl/set.h
|
||||
- ${NB_DIR}/include/nanobind/stl/shared_ptr.h
|
||||
- ${NB_DIR}/include/nanobind/stl/string.h
|
||||
- ${NB_DIR}/include/nanobind/stl/string_view.h
|
||||
- ${NB_DIR}/include/nanobind/stl/tuple.h
|
||||
- ${NB_DIR}/include/nanobind/stl/unique_ptr.h
|
||||
- ${NB_DIR}/include/nanobind/stl/unordered_map.h
|
||||
- ${NB_DIR}/include/nanobind/stl/unordered_set.h
|
||||
- ${NB_DIR}/include/nanobind/stl/variant.h
|
||||
- ${NB_DIR}/include/nanobind/stl/vector.h
|
||||
- ${NB_DIR}/include/nanobind/eigen/dense.h
|
||||
- ${NB_DIR}/include/nanobind/eigen/sparse.h
|
||||
+ ${NB_DIR}/../../include/nanobind/make_iterator.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nanobind.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_accessor.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_attr.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_call.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_cast.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_class.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_defs.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_descr.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_enums.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_error.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_func.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_lib.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_misc.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_python.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_traits.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_tuple.h
|
||||
+ ${NB_DIR}/../../include/nanobind/nb_types.h
|
||||
+ ${NB_DIR}/../../include/nanobind/ndarray.h
|
||||
+ ${NB_DIR}/../../include/nanobind/trampoline.h
|
||||
+ ${NB_DIR}/../../include/nanobind/operators.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/array.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/bind_map.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/bind_vector.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/detail
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/detail/nb_array.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/detail/nb_dict.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/detail/nb_list.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/detail/nb_set.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/detail/traits.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/filesystem.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/function.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/list.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/map.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/optional.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/pair.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/set.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/shared_ptr.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/string.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/string_view.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/tuple.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/unique_ptr.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/unordered_map.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/unordered_set.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/variant.h
|
||||
+ ${NB_DIR}/../../include/nanobind/stl/vector.h
|
||||
+ ${NB_DIR}/../../include/nanobind/eigen/dense.h
|
||||
+ ${NB_DIR}/../../include/nanobind/eigen/sparse.h
|
||||
|
||||
${NB_DIR}/src/buffer.h
|
||||
${NB_DIR}/src/hash.h
|
||||
@@ -230,7 +230,7 @@ function (nanobind_build_library TARGET_NAME)
|
||||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC
|
||||
${Python_INCLUDE_DIRS}
|
||||
- ${NB_DIR}/include)
|
||||
+ ${NB_DIR}/../../include)
|
||||
|
||||
target_compile_features(${TARGET_NAME} PUBLIC cxx_std_17)
|
||||
nanobind_set_visibility(${TARGET_NAME})
|
@ -8,11 +8,8 @@ vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO wjakob/nanobind
|
||||
REF "v${VERSION}"
|
||||
SHA512 40311f6416b9fdce764bf80baf156b42e1f00e03f3427b9f9db401fa4eeeb9db83b79c04ebefec2f6ed185419d1b22065f8f12eba3ad57056d2e0f825444b785
|
||||
SHA512 e47c2eab39fc507f5cb1b73f76a2eb9a6d475b56b3628e8372296ed7381844aed56ba7b59fb765651e660688be2762d094ec9368beb70201091f01d27a549a3a
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
find_dependency_python.patch
|
||||
move_include_dir.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nanobind",
|
||||
"version-semver": "1.9.2",
|
||||
"version-semver": "2.2.0",
|
||||
"description": "Tiny and efficient C++/Python bindings",
|
||||
"homepage": "https://nanobind.readthedocs.io/en/latest/",
|
||||
"license": "BSD-3-Clause",
|
||||
|
@ -6197,7 +6197,7 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"nanobind": {
|
||||
"baseline": "1.9.2",
|
||||
"baseline": "2.2.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"nanodbc": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "88c0b600287009e3c5c0644c61a8a50cdd2c2740",
|
||||
"version-semver": "2.2.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "14a09776a3248629b8efbf096dcb787c01abcfe9",
|
||||
"version-semver": "1.9.2",
|
||||
|
Loading…
Reference in New Issue
Block a user