4 Commits
Author SHA1 Message Date
Oliver Hamlet f97de90e02 Update wrapper version to 3.1.1 2018-05-12 21:50:30 +01:00
Oliver Hamlet d00c59b7b2 Update LOOT API to v0.13.2 2018-05-12 21:15:17 +01:00
Oliver Hamlet e06227f437 Build with debug info and package PDB 2018-05-12 19:26:21 +01:00
Oliver Hamlet bcc536d4b0 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.
2018-05-12 19:12:47 +01:00
5 changed files with 25 additions and 15 deletions
+13 -5
View File
@@ -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}")
@@ -50,9 +50,9 @@ add_subdirectory(${PYBIND11_EXTRACTED_PATH})
#######################################
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
set(LOOT_API_URL "https://github.com/loot/loot-api/releases/download/0.13.1/loot_api-0.13.1-0-g1804e45_dev-win32.7z")
set(LOOT_API_URL "https://github.com/loot/loot-api/releases/download/0.13.2/loot_api-0.13.2-0-g5956e60_dev-win32.7z")
else()
set(LOOT_API_URL "https://github.com/loot/loot-api/releases/download/0.13.1/loot-api.tar.xz")
set(LOOT_API_URL "https://github.com/loot/loot-api/releases/download/0.13.2/loot-api.tar.xz")
endif()
ExternalProject_Add(loot-api-c++
@@ -128,12 +128,20 @@ add_custom_command(TARGET loot_api POST_BUILD
install(TARGETS loot_api
DESTINATION "."
CONFIGURATIONS Release)
CONFIGURATIONS Release RelWithDebInfo)
install(FILES "${LOOT_API_EXTRACTED_PATH}/${LOOT_API_SHARED_LIBRARY}"
"${CMAKE_SOURCE_DIR}/docs/README.md"
DESTINATION "."
CONFIGURATIONS Release)
CONFIGURATIONS Release RelWithDebInfo)
IF (MSVC)
install(FILES $<TARGET_PDB_FILE:loot_api>
DESTINATION .
OPTIONAL
CONFIGURATIONS RelWithDebInfo
RENAME loot_api_python.pdb)
ENDIF ()
########################################
# CPack
+3 -3
View File
@@ -2,7 +2,7 @@ os: Visual Studio 2015
version: "{build}-{branch}"
configuration: Release
configuration: RelWithDebInfo
environment:
bintray_auth_token:
@@ -22,12 +22,12 @@ build:
project: 'c:\projects\loot-api-python\build\loot_api_python.sln'
test_script:
- cd %APPVEYOR_BUILD_FOLDER%\build\Release
- cd %APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%
- python -m unittest test
after_test:
- cd %APPVEYOR_BUILD_FOLDER%\build
- cpack
- cpack -C %CONFIGURATION%
# AppVeyor checks out a specific commit, but that means the archive script
# can't tell which branch it's on, so rename the 7z archives.
- ps: $env:GIT_DESCRIBE = ((git describe --tags --long --always) | Out-String) -replace "`n|`r", ""
+4 -2
View File
@@ -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();
}
+4 -4
View File
@@ -45,17 +45,17 @@ class TestLootApi(GameFixture):
def test_version(self):
self.assertEqual(Version.major, 0)
self.assertEqual(Version.minor, 13)
self.assertEqual(Version.patch, 1)
self.assertEqual(Version.patch, 2)
self.assertNotEqual(Version.revision, u'')
self.assertEqual(Version.string(), "0.13.1")
self.assertEqual(Version.string(), "0.13.2")
def test_wrapper_version(self):
self.assertEqual(WrapperVersion.major, 3)
self.assertEqual(WrapperVersion.minor, 1)
self.assertEqual(WrapperVersion.patch, 0)
self.assertEqual(WrapperVersion.patch, 1)
self.assertNotEqual(WrapperVersion.revision, u'')
self.assertNotEqual(WrapperVersion.revision, Version.revision)
self.assertEqual(WrapperVersion.string(), "3.1.0")
self.assertEqual(WrapperVersion.string(), "3.1.1")
def test_create_db(self):
game = create_game_handle(GameType.tes4, self.game_path, self.local_path)
+1 -1
View File
@@ -27,7 +27,7 @@
namespace loot {
const unsigned int WrapperVersion::major = 3;
const unsigned int WrapperVersion::minor = 1;
const unsigned int WrapperVersion::patch = 0;
const unsigned int WrapperVersion::patch = 1;
const std::string WrapperVersion::revision = "@GIT_COMMIT_STRING@";
std::string WrapperVersion::string() {