mirror of
https://github.com/loot/libloot-python.git
synced 2026-07-27 14:14:13 -07:00
Update libloot to v0.15.0
This commit is contained in:
+3
-3
@@ -61,12 +61,12 @@ add_subdirectory(${PYBIND11_EXTRACTED_PATH})
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
if (NOT "${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64")
|
||||
set(LIBLOOT_URL "https://github.com/loot/libloot/releases/download/0.14.7/libloot-0.14.7-0-g1878d48_dev-win32.7z")
|
||||
set(LIBLOOT_URL "https://github.com/loot/libloot/releases/download/0.15.0/libloot-0.15.0-0-g629fdab_master-win32.7z")
|
||||
else()
|
||||
set(LIBLOOT_URL "https://github.com/loot/libloot/releases/download/0.14.7/libloot-0.14.7-0-g1878d48_dev-win64.7z")
|
||||
set(LIBLOOT_URL "https://github.com/loot/libloot/releases/download/0.15.0/libloot-0.15.0-0-g629fdab_master-win64.7z")
|
||||
endif()
|
||||
else()
|
||||
set(LIBLOOT_URL "https://github.com/loot/libloot/releases/download/0.14.7/libloot.tar.xz")
|
||||
set(LIBLOOT_URL "https://github.com/loot/libloot/releases/download/0.15.0/libloot.tar.xz")
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(libloot
|
||||
|
||||
@@ -136,12 +136,6 @@ Functions
|
||||
|
||||
Checks for API compatibility. Wraps :cpp:func:`loot::IsCompatible`.
|
||||
|
||||
.. py:function:: loot_api.InitialiseLocale(unicode = u'') -> NoneType
|
||||
|
||||
Initialise the current global locale using the given ID. A blank value means
|
||||
that the system default locale will be initialised. Wraps
|
||||
:cpp:func:`loot::InitialiseLocale`.
|
||||
|
||||
.. py:function:: loot_api.create_game_handle(game : loot_api.GameType, game_path : unicode, [game_local_path : unicode = u'']) -> loot_api.GameInterface
|
||||
|
||||
Initialise a new game handle. Wraps :cpp:func:`loot::CreateGameHandle`.
|
||||
|
||||
@@ -39,7 +39,6 @@ Getting a Plugin's Bash Tag Suggestions
|
||||
To get a plugin's Bash Tag suggestions from a ``masterlist.yaml`` metadata file::
|
||||
|
||||
>>> import loot_api
|
||||
>>> loot_api.initialise_locale()
|
||||
>>> db = loot_api.create_game_handle(loot_api.GameType.tes4, 'C:\\path\\to\\oblivion\\directory')
|
||||
>>> db.load_lists('masterlist.yaml')
|
||||
>>> tags = db.get_plugin_tags(u'Unofficial Oblivion Patch.esp')
|
||||
|
||||
@@ -168,8 +168,6 @@ void bindFunctions(pybind11::module& module) {
|
||||
|
||||
module.def("is_compatible", &IsCompatible);
|
||||
|
||||
module.def("initialise_locale", &InitialiseLocale, arg("id") = "");
|
||||
|
||||
module.def("create_game_handle", &py::CreateGameHandle,
|
||||
arg("game"),
|
||||
arg("game_path"),
|
||||
|
||||
+4
-6
@@ -18,13 +18,11 @@ from loot_api import PluginCleanliness
|
||||
from loot_api import create_game_handle
|
||||
from loot_api import is_compatible
|
||||
from loot_api import set_logging_callback
|
||||
from loot_api import initialise_locale
|
||||
|
||||
def logging_callback(level, message):
|
||||
pass
|
||||
|
||||
set_logging_callback(logging_callback)
|
||||
initialise_locale()
|
||||
|
||||
class GameFixture(unittest.TestCase):
|
||||
game_path = os.path.join(u'.', u'Oblivion')
|
||||
@@ -48,14 +46,14 @@ class GameFixture(unittest.TestCase):
|
||||
class TestLootApi(GameFixture):
|
||||
def test_is_compatible(self):
|
||||
self.assertFalse(is_compatible(0, 9, 0))
|
||||
self.assertTrue(is_compatible(0, 14, 0))
|
||||
self.assertTrue(is_compatible(0, 15, 0))
|
||||
|
||||
def test_version(self):
|
||||
self.assertEqual(Version.major, 0)
|
||||
self.assertEqual(Version.minor, 14)
|
||||
self.assertEqual(Version.patch, 7)
|
||||
self.assertEqual(Version.minor, 15)
|
||||
self.assertEqual(Version.patch, 0)
|
||||
self.assertNotEqual(Version.revision, u'')
|
||||
self.assertEqual(Version.string(), "0.14.7")
|
||||
self.assertEqual(Version.string(), "0.15.0")
|
||||
|
||||
def test_wrapper_version(self):
|
||||
self.assertEqual(WrapperVersion.major, 4)
|
||||
|
||||
Reference in New Issue
Block a user