mirror of
https://github.com/loot/libloot-python.git
synced 2026-07-27 14:14:13 -07:00
Update to pybind11 v2.2.1
This commit is contained in:
+4
-3
@@ -30,9 +30,10 @@ configure_file("${CMAKE_SOURCE_DIR}/src/wrapper_version.cpp.in" "${CMAKE_BINARY_
|
||||
# pybind11
|
||||
#######################################
|
||||
|
||||
set(PYBIND11_URL "https://github.com/pybind/pybind11/archive/v2.1.1.tar.gz")
|
||||
set(PYBIND11_DOWNLOAD_PATH "${EXTERNAL_PROJECTS_PATH}/pybind11-2.1.1.tar.gz")
|
||||
set(PYBIND11_EXTRACTED_PATH "${EXTERNAL_PROJECTS_PATH}/pybind11-2.1.1")
|
||||
set(PYBIND11_VERSION "2.2.1")
|
||||
set(PYBIND11_URL "https://github.com/pybind/pybind11/archive/v${PYBIND11_VERSION}.tar.gz")
|
||||
set(PYBIND11_DOWNLOAD_PATH "${EXTERNAL_PROJECTS_PATH}/pybind11-${PYBIND11_VERSION}.tar.gz")
|
||||
set(PYBIND11_EXTRACTED_PATH "${EXTERNAL_PROJECTS_PATH}/pybind11-${PYBIND11_VERSION}")
|
||||
|
||||
if (NOT EXISTS ${PYBIND11_DOWNLOAD_PATH})
|
||||
file(DOWNLOAD ${PYBIND11_URL} ${PYBIND11_DOWNLOAD_PATH})
|
||||
|
||||
+4
-6
@@ -82,14 +82,14 @@ void bindMetadataClasses(pybind11::module& module) {
|
||||
}
|
||||
|
||||
void bindVersionClasses(pybind11::module& module) {
|
||||
class_<LootVersion>(module, "Version", metaclass())
|
||||
class_<LootVersion>(module, "Version")
|
||||
.def_readonly_static("major", &LootVersion::major)
|
||||
.def_readonly_static("minor", &LootVersion::minor)
|
||||
.def_readonly_static("patch", &LootVersion::patch)
|
||||
.def_readonly_static("revision", &LootVersion::revision)
|
||||
.def_static("string", LootVersion::string);
|
||||
|
||||
class_<WrapperVersion>(module, "WrapperVersion", metaclass())
|
||||
class_<WrapperVersion>(module, "WrapperVersion")
|
||||
.def_readonly_static("major", &WrapperVersion::major)
|
||||
.def_readonly_static("minor", &WrapperVersion::minor)
|
||||
.def_readonly_static("patch", &WrapperVersion::patch)
|
||||
@@ -131,12 +131,10 @@ void bindFunctions(pybind11::module& module) {
|
||||
}
|
||||
}
|
||||
|
||||
PYBIND11_PLUGIN(loot_api) {
|
||||
pybind11::module module("loot_api", "A Python module that wraps the LOOT API, generated by pybind11.");
|
||||
PYBIND11_MODULE(loot_api, module) {
|
||||
module.doc() = "A Python module that wraps the LOOT API, generated by pybind11.";
|
||||
|
||||
loot::bindEnums(module);
|
||||
loot::bindClasses(module);
|
||||
loot::bindFunctions(module);
|
||||
|
||||
return module.ptr();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user