From bcc536d4b0463e7f54b0ec788d116910cb319690 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Fri, 11 May 2018 22:47:26 +0100 Subject: [PATCH] Downgrade to pybind11 v2.1.1 Updating to v2.2.1 introduced a runtime issue that's environment-specific but it's not clear what the issue is, so just downgrade for now. --- CMakeLists.txt | 2 +- src/main.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cdb601..85ef0f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ configure_file("${CMAKE_SOURCE_DIR}/src/wrapper_version.cpp.in" "${CMAKE_BINARY_ # pybind11 ####################################### -set(PYBIND11_VERSION "2.2.2") +set(PYBIND11_VERSION "2.1.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}") diff --git a/src/main.cpp b/src/main.cpp index 7d08083..c1ba794 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -146,10 +146,12 @@ void bindFunctions(pybind11::module& module) { } } -PYBIND11_MODULE(loot_api, module) { - module.doc() = "A Python module that wraps the LOOT API, generated by pybind11."; +PYBIND11_PLUGIN(loot_api) { + pybind11::module module("loot_api", "A Python module that wraps the LOOT API, generated by pybind11."); loot::bindEnums(module); loot::bindClasses(module); loot::bindFunctions(module); + + return module.ptr(); }