mirror of
https://github.com/loot/libloot-python.git
synced 2026-07-27 14:14:13 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f97de90e02 | ||
|
|
d00c59b7b2 | ||
|
|
e06227f437 | ||
|
|
bcc536d4b0 |
+13
-5
@@ -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
@@ -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
@@ -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
@@ -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)
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user