From dcf9b8b96b21ee73218fddebd8630b3e52e58f5b Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Tue, 22 Oct 2019 21:02:15 +0100 Subject: [PATCH] Rename package and repository to libloot-python and module to loot --- CMakeLists.txt | 40 +++++++++++++---------- README.md | 12 +++---- appveyor.yml | 16 ++++----- docs/README.md | 8 ++--- docs/conf.py | 14 ++++---- docs/index.rst | 6 ++-- docs/reference.rst | 65 ++++++++++++++++++------------------- docs/usage.rst | 14 ++++---- python/loot/__init__.py | 1 + python/loot_api/__init__.py | 1 - python/setup.py | 8 ++--- src/convenience.h | 4 +-- src/main.cpp | 4 +-- src/plugin_cleanliness.h | 6 ++-- src/plugin_tags.h | 4 +-- src/wrapper_version.h | 4 +-- test/test.py | 18 +++++----- 17 files changed, 114 insertions(+), 111 deletions(-) create mode 100644 python/loot/__init__.py delete mode 100644 python/loot_api/__init__.py diff --git a/CMakeLists.txt b/CMakeLists.txt index e8a345d..ae3213e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.1) -project (loot_api_python) +project (libloot-python) include(ExternalProject) set(EXTERNAL_PROJECTS_PATH "${CMAKE_BINARY_DIR}/external/src") @@ -29,7 +29,7 @@ ELSE() SET (GIT_COMMIT_STRING "unknown") ENDIF () -message(STATUS "LOOT API Python version: ${LIBLOOT_PY_VERSION_MAJOR}.${LIBLOOT_PY_VERSION_MINOR}.${LIBLOOT_PY_VERSION_PATCH}") +message(STATUS "libloot-python version: ${LIBLOOT_PY_VERSION_MAJOR}.${LIBLOOT_PY_VERSION_MINOR}.${LIBLOOT_PY_VERSION_PATCH}") message(STATUS "Git revision: ${GIT_COMMIT_STRING}") # Write to file. @@ -56,7 +56,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E tar xfz ${PYBIND11_DOWNLOAD_PATH} add_subdirectory(${PYBIND11_EXTRACTED_PATH}) ####################################### -# LOOT API +# libloot ####################################### if (CMAKE_SYSTEM_NAME MATCHES "Windows") @@ -88,16 +88,20 @@ set(LIBLOOT_SHARED_LIBRARY "${CMAKE_SHARED_LIBRARY_PREFIX}loot${CMAKE_SHARED_LIB # Python Module ####################################### -pybind11_add_module(loot_api "${CMAKE_SOURCE_DIR}/src/main.cpp" +pybind11_add_module(libloot-python "${CMAKE_SOURCE_DIR}/src/main.cpp" "${CMAKE_SOURCE_DIR}/src/convenience.cpp" "${CMAKE_BINARY_DIR}/generated/wrapper_version.cpp") -add_dependencies(loot_api libloot) +# Set the target output name to loot to follow common Python library naming +# conventions (no lib, no -python). +set_target_properties(libloot-python PROPERTIES OUTPUT_NAME loot) + +add_dependencies(libloot-python libloot) if (CMAKE_SYSTEM_NAME MATCHES "Windows") - target_link_libraries(loot_api PRIVATE ${LIBLOOT_STATIC_LIBRARY}) + target_link_libraries(libloot-python PRIVATE ${LIBLOOT_STATIC_LIBRARY}) else() - target_link_libraries(loot_api PRIVATE ${LIBLOOT_SHARED_LIBRARY}) + target_link_libraries(libloot-python PRIVATE ${LIBLOOT_SHARED_LIBRARY}) endif() ######################################## @@ -106,29 +110,29 @@ endif() find_package(PythonInterp REQUIRED) -# Copy the API binary to the build directory. -add_custom_command(TARGET loot_api POST_BUILD +# Copy the libloot binary to the build directory. +add_custom_command(TARGET libloot-python POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${LIBLOOT_EXTRACTED_PATH}/${LIBLOOT_SHARED_LIBRARY}" - "$/${LIBLOOT_SHARED_LIBRARY}") + "$/${LIBLOOT_SHARED_LIBRARY}") enable_testing() add_test(NAME python - WORKING_DIRECTORY $ + WORKING_DIRECTORY $ COMMAND "${PYTHON_EXECUTABLE}" ${CMAKE_SOURCE_DIR}/test/test.py) ######################################## # Install ######################################## -install(TARGETS loot_api - DESTINATION "loot_api" +install(TARGETS libloot-python + DESTINATION "loot" CONFIGURATIONS Release RelWithDebInfo) install(FILES "${LIBLOOT_EXTRACTED_PATH}/${LIBLOOT_SHARED_LIBRARY}" - "${CMAKE_SOURCE_DIR}/python/loot_api/__init__.py" - DESTINATION "loot_api" + "${CMAKE_SOURCE_DIR}/python/loot/__init__.py" + DESTINATION "loot" CONFIGURATIONS Release RelWithDebInfo) install(FILES "${CMAKE_SOURCE_DIR}/docs/README.md" @@ -138,11 +142,11 @@ install(FILES "${CMAKE_SOURCE_DIR}/docs/README.md" CONFIGURATIONS Release RelWithDebInfo) IF (MSVC) - install(FILES $ - DESTINATION "loot_api" + install(FILES $ + DESTINATION "loot" OPTIONAL CONFIGURATIONS RelWithDebInfo - RENAME loot_api_python.pdb) + RENAME libloot-python.pdb) ENDIF () ######################################## diff --git a/README.md b/README.md index c8352dc..b2e288a 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ -LOOT API Python Module -======================= +libloot-python +============== -[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/k2ugge3po7254o1o/branch/master?svg=true)](https://ci.appveyor.com/project/LOOT/loot-api-python/branch/master) +[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/k2ugge3po7254o1o/branch/master?svg=true)](https://ci.appveyor.com/project/LOOT/libloot-python/branch/master) [![Documentation Status](https://readthedocs.org/projects/loot-api-python/badge/)](http://loot-api-python.readthedocs.io/) A Python module that wraps libloot, generated by [pybind11](https://github.com/pybind/pybind11). Not everything in the API is exposed: coverage can be extended on request (or by pull request). ## Downloads -Snapshot builds are available on [Bintray](https://bintray.com/loot/snapshots/loot-api-python). The snapshot build archives are named like so: +Snapshot builds are available on [Bintray](https://bintray.com/loot/snapshots/libloot-python). The snapshot build archives are named like so: ``` -loot_api_python--python-win.zip +libloot-python--python-win.zip ``` -For example `loot_api_python-94de368-python2.7-win32.zip` was built using the revision with shortened commit ID `94de368`. +For example `libloot-python-94de368-python2.7-win32.zip` was built using the revision with shortened commit ID `94de368`. ## Documentation diff --git a/appveyor.yml b/appveyor.yml index c2e0b6a..a43fd2e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,7 +35,7 @@ before_build: build: verbosity: minimal - project: 'c:\projects\loot-api-python\build\loot_api_python.sln' + project: 'c:\projects\libloot-python\build\libloot-python.sln' test_script: - cd %APPVEYOR_BUILD_FOLDER%\build @@ -49,8 +49,8 @@ after_test: - ps: $env:ARCHITECTURE = $env:PLATFORM.substring($env:PLATFORM.length - 2) artifacts: - - path: build\package\loot_api_python-$(PACKAGE_VERSION)-python$(PYTHON_VERSION)-win$(ARCHITECTURE).zip - name: loot_api_python + - path: build\package\libloot-python-$(PACKAGE_VERSION)-python$(PYTHON_VERSION)-win$(ARCHITECTURE).zip + name: libloot-python deploy: - provider: BinTray @@ -59,22 +59,22 @@ deploy: secure: PgsEA6TjHVf718zMnK7J/fT1hUAVNKBeWhpYgYaeCyeZk37VT4Ics6j7+B7ElLEr subject: loot repo: snapshots - package: loot-api-python + package: libloot-python version: $(PACKAGE_VERSION) publish: true - artifact: loot_api_python + artifact: libloot-python - provider: GitHub tag: $(APPVEYOR_REPO_TAG_NAME) - release: LOOT API Python Module v$(APPVEYOR_REPO_TAG_NAME) + release: libloot-python v$(APPVEYOR_REPO_TAG_NAME) description: | Requires Windows 7 or later and the [MSVC 2017 x86 redistributable](https://download.visualstudio.microsoft.com/download/pr/749aa419-f9e4-4578-a417-a43786af205e/d59197078cc425377be301faba7dd87a/vc_redist.x86.exe), and [7-Zip](http://www.7-zip.org/) to extract the archive. auth_token: secure: yDqT5l/e5MntbW99V6+MHlfFgNv+UIogFfeyUVqtFk5lFRB/dAraLLwKCLl6y+DH - artifact: loot_api_python + artifact: libloot-python draft: false on: appveyor_repo_tag: true on_success: - - ps: python "$env:APPVEYOR_BUILD_FOLDER\delete_old_bintray_versions.py" -g loot/loot-api-python -b loot/snapshots/loot-api-python -u wrinklyninja -k $env:bintray_auth_token -t $env:github_auth_token -n 30 + - ps: python "$env:APPVEYOR_BUILD_FOLDER\delete_old_bintray_versions.py" -g loot/libloot-python -b loot/snapshots/libloot-python -u wrinklyninja -k $env:bintray_auth_token -t $env:github_auth_token -n 30 diff --git a/docs/README.md b/docs/README.md index f39f1ae..0548378 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,13 +1,13 @@ -LOOT API Python Wrapper -======================= +libloot-python +============== -This archive contains a build of the LOOT API Python wrapper module and its corresponding 32-bit Windows build of the LOOT API. +This archive contains a build of the libloot-python wrapper module and its corresponding 32-bit Windows build of libloot. The DLL requires the [MSVC 2017 x86 redistributable](https://download.visualstudio.microsoft.com/download/pr/749aa419-f9e4-4578-a417-a43786af205e/d59197078cc425377be301faba7dd87a/vc_redist.x86.exe) to be installed. See the [online documentation](http://loot-api-python.readthedocs.org/) for more information. -The library source code is available [on GitHub](https://github.com/loot/loot-api-python). +The library source code is available [on GitHub](https://github.com/loot/libloot-python). --- diff --git a/docs/conf.py b/docs/conf.py index 9d701b1..f473a66 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# LOOT API Python Module documentation build configuration file, created by +# libloot-python documentation build configuration file, created by # sphinx-quickstart on Mon Aug 15 07:11:32 2016. # # This file is execfile()d with the current directory set to its @@ -54,7 +54,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'LOOT API Python Module' +project = u'libloot-python' copyright = u'2019, WrinklyNinja' author = u'WrinklyNinja' @@ -139,7 +139,7 @@ html_theme = 'sphinx_rtd_theme' # The name for this set of Sphinx documents. # " v documentation" by default. # -# html_title = u'LOOT API Python Module v;atest' +# html_title = u'libloot-python v;atest' # A shorter title for the navigation bar. Default is the same as html_title. # @@ -265,7 +265,7 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'LOOTAPIPythonModule.tex', u'LOOT API Python Module Documentation', + (master_doc, 'libloot-python.tex', u'libloot-python Documentation', u'WrinklyNinja', 'manual'), ] @@ -307,7 +307,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'lootapipythonmodule', u'LOOT API Python Module Documentation', + (master_doc, 'libloot-python', u'libloot-python Documentation', [author], 1) ] @@ -322,8 +322,8 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'LOOTAPIPythonModule', u'LOOT API Python Module Documentation', - author, 'LOOTAPIPythonModule', 'One line description of project.', + (master_doc, 'libloot-python', u'libloot-python Documentation', + author, 'libloot-python', 'One line description of project.', 'Miscellaneous'), ] diff --git a/docs/index.rst b/docs/index.rst index c29b0c2..22823b7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,10 +1,10 @@ -.. LOOT API Python Module documentation master file, created by +.. libloot-python documentation master file, created by sphinx-quickstart on Mon Aug 15 07:11:32 2016. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -LOOT API Python Module -====================== +libloot-python +============== Contents: diff --git a/docs/reference.rst b/docs/reference.rst index 0993a49..c27960c 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -2,8 +2,8 @@ API Reference ************* -As this API is just a wrapper for LOOT's C++ API, its documentation is linked to -for all non-Python-specific information. +As this API is just a wrapper for libloot's C++ API, its documentation is linked +to for all non-Python-specific information. Enumerations ============ @@ -12,9 +12,9 @@ The wrapped enumeration types below are classes in Python, but the distinction makes no difference in practice, so they're grouped here for semantics. All values are unsigned integer constants. -.. py:class:: loot_api.GameType +.. py:class:: loot.GameType - Wraps :cpp:type:`loot::GameType` to expose the LOOT API's game codes. + Wraps :cpp:type:`loot::GameType` to expose libloot's game codes. .. py:attribute:: fo3 .. py:attribute:: fo4 @@ -23,9 +23,9 @@ values are unsigned integer constants. .. py:attribute:: tes5 .. py:attribute:: tes5se -.. py:class:: loot_api.LogLevel +.. py:class:: loot.LogLevel - Wraps :cpp:type:`loot::LogLevel` to expose the LOOT API's log level codes. + Wraps :cpp:type:`loot::LogLevel` to expose libloot's log level codes. .. py:attribute:: trace .. py:attribute:: debug @@ -34,16 +34,16 @@ values are unsigned integer constants. .. py:attribute:: error .. py:attribute:: fatal -.. py:class:: loot_api.MessageType +.. py:class:: loot.MessageType - Wraps :cpp:type:`loot::MessageType` to expose the LOOT API's message type + Wraps :cpp:type:`loot::MessageType` to expose libloot's message type codes. .. py:attribute:: error .. py:attribute:: say .. py:attribute:: warn -.. py:class:: loot_api.PluginCleanliness +.. py:class:: loot.PluginCleanliness Codes used to indicate the cleanliness of a plugin according to the information contained within the loaded masterlist/userlist. @@ -70,7 +70,7 @@ Public-Field Data Structures Classes with public fields and no member functions. -.. py:class:: loot_api.MasterlistInfo +.. py:class:: loot.MasterlistInfo Wraps :cpp:class:`loot::MasterlistInfo`. @@ -87,13 +87,13 @@ Classes with public fields and no member functions. A boolean that is true if the masterlist has been modified from its state at the commit given by :py:attr:`revision_id`. -.. py:class:: loot_api.SimpleMessage +.. py:class:: loot.SimpleMessage Wraps :cpp:class:`loot::SimpleMessage`. .. py:attribute:: type - A :py:class:`loot_api.MessageType` giving the message type. + A :py:class:`loot.MessageType` giving the message type. .. py:attribute:: language @@ -107,7 +107,7 @@ Classes with public fields and no member functions. A Unicode string containing the message condition. -.. py:class:: loot_api.PluginTags +.. py:class:: loot.PluginTags Wraps :cpp:class:`loot::PluginTags`. @@ -127,68 +127,68 @@ Classes with public fields and no member functions. Functions ========= -.. py:function:: loot_api.set_logging_callback(callback) -> NoneType +.. py:function:: loot.set_logging_callback(callback) -> NoneType Set the callback function that is called when logging. Wraps :cpp:func:`loot::SetLoggingCallback`. -.. py:function:: loot_api.is_compatible(int, int, int) -> bool +.. py:function:: loot.is_compatible(int, int, int) -> bool Checks for API compatibility. Wraps :cpp:func:`loot::IsCompatible`. -.. py:function:: loot_api.create_game_handle(game : loot_api.GameType, game_path : unicode, [game_local_path : unicode = u'']) -> loot_api.GameInterface +.. py:function:: loot.create_game_handle(game : loot.GameType, game_path : unicode, [game_local_path : unicode = u'']) -> loot.GameInterface Initialise a new game handle. Wraps :cpp:func:`loot::CreateGameHandle`. Classes ======= -.. py:class:: loot_api.GameInterface +.. py:class:: loot.GameInterface Wraps :cpp:class:`loot::GameInterface`. - .. py:function:: loot_api.get_database() -> loot_api.DatabaseInterface + .. py:function:: loot.get_database() -> loot.DatabaseInterface Get a database handle. Wraps :cpp:func:`loot::GetDatabase`. - .. py:function:: loot_api.load_current_load_order_state() -> NoneType + .. py:function:: loot.load_current_load_order_state() -> NoneType Load the current load order state, discarding any previously held state. Wraps :cpp:func:`loot::LoadCurrentLoadOrderState`. -.. py:class:: loot_api.DatabaseInterface +.. py:class:: loot.DatabaseInterface Wraps :cpp:class:`loot::DatabaseInterface`. - .. py:method:: get_masterlist_revision(loot_api.DatabaseInterface, unicode, bool) -> loot_api.MasterlistInfo + .. py:method:: get_masterlist_revision(loot.DatabaseInterface, unicode, bool) -> loot.MasterlistInfo Gets the give masterlist’s source control revision. Wraps :cpp:func:`GetMasterlistRevision`. - .. py:method:: get_plugin_metadata(loot_api.DatabaseInterface, plugin : unicode, [includeUserMetadata : bool = True, [evaluateConditions : bool = False]]) -> loot_api.PluginMetadata + .. py:method:: get_plugin_metadata(loot.DatabaseInterface, plugin : unicode, [includeUserMetadata : bool = True, [evaluateConditions : bool = False]]) -> loot.PluginMetadata Get all a plugin’s loaded metadata. Wraps :cpp:func:`GetPluginMetadata`. - .. py:method:: get_plugin_cleanliness(loot_api.DatabaseInterface, plugin : unicode, [evaluateConditions : bool = False]) -> loot_api.PluginCleanliness + .. py:method:: get_plugin_cleanliness(loot.DatabaseInterface, plugin : unicode, [evaluateConditions : bool = False]) -> loot.PluginCleanliness Determines the database’s knowledge of a plugin’s cleanliness. Outputs whether the plugin should be cleaned or not, or if no data is available. - .. py:method:: get_plugin_tags(loot_api.DatabaseInterface, plugin : unicode, [evaluateConditions : bool = False]) -> loot_api.PluginTags + .. py:method:: get_plugin_tags(loot.DatabaseInterface, plugin : unicode, [evaluateConditions : bool = False]) -> loot.PluginTags Outputs the Bash Tags suggested for addition and removal by the database for the given plugin. - .. py:method:: load_lists(loot_api.DatabaseInterface, masterlist_path : unicode, [userlist_path : unicode = u'']) -> NoneType + .. py:method:: load_lists(loot.DatabaseInterface, masterlist_path : unicode, [userlist_path : unicode = u'']) -> NoneType Loads the masterlist and userlist from the paths specified. Wraps :cpp:func:`LoadLists`. - .. py:method:: update_masterlist(loot_api.DatabaseInterface, unicode, unicode, unicode) -> bool + .. py:method:: update_masterlist(loot.DatabaseInterface, unicode, unicode, unicode) -> bool Updates the given masterlist using the given Git repository details. Wraps :cpp:func:`UpdateMasterlist`. - .. py:method:: write_minimal_list(loot_api.DatabaseInterface, unicode, bool) -> NoneType + .. py:method:: write_minimal_list(loot.DatabaseInterface, unicode, bool) -> NoneType Writes a minimal metadata file containing only Bash Tag suggestions and/or cleanliness info from the loaded metadata. Wraps :cpp:func:`WriteMinimalList`. -.. py:class:: loot_api.Version +.. py:class:: loot.Version Wraps :cpp:class:`loot::LootVersion`. @@ -212,10 +212,9 @@ Classes Returns the API version as a string of the form ``major.minor.patch`` -.. py:class:: loot_api.WrapperVersion +.. py:class:: loot.WrapperVersion - Provides information about the version of the LOOT API Python wrapper that is - being run. + Provides information about the version of libloot-python that is being run. .. py:attribute:: major @@ -237,11 +236,11 @@ Classes Returns the API version as a string of the form ``major.minor.patch`` -.. py:class:: loot_api.PluginMetadata +.. py:class:: loot.PluginMetadata Wraps :cpp:class:`loot::PluginMetadata`. - .. py:method:: get_simple_messages(loot_api.PluginMetadata, unicode) -> list + .. py:method:: get_simple_messages(loot.PluginMetadata, unicode) -> list Get the plugin’s messages as SimpleMessage objects for the given language. Wraps :cpp:func:`GetPluginMessages`. diff --git a/docs/usage.rst b/docs/usage.rst index ccd4c1f..3da9ef4 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -7,8 +7,8 @@ Installing the wrapper Build archives contain two binaries: -* ``loot_api.pyd`` is the Python wrapper -* ``loot_api.dll`` is the C++ API DLL that the Python wrapper was built against. +* ``loot.*.pyd`` is the Python wrapper +* ``loot.dll`` is the C++ library DLL that the Python wrapper was built against. The C++ DLL requires the `Visual C++ 2017 Redistributable (x86)`_ to be installed. @@ -27,10 +27,10 @@ Checking Compatibility To check if the module loaded is compatible with the version of the API that you developed against:: - >>> import loot_api - >>> loot_api.is_compatible(0,14,0) + >>> import loot + >>> loot.is_compatible(0,14,0) True - >>> loot_api.is_compatible(0,9,0) + >>> loot.is_compatible(0,9,0) False Getting a Plugin's Bash Tag Suggestions @@ -38,8 +38,8 @@ Getting a Plugin's Bash Tag Suggestions To get a plugin's Bash Tag suggestions from a ``masterlist.yaml`` metadata file:: - >>> import loot_api - >>> db = loot_api.create_game_handle(loot_api.GameType.tes4, 'C:\\path\\to\\oblivion\\directory') + >>> import loot + >>> db = loot.create_game_handle(loot.GameType.tes4, 'C:\\path\\to\\oblivion\\directory') >>> db.load_lists('masterlist.yaml') >>> tags = db.get_plugin_tags(u'Unofficial Oblivion Patch.esp') >>> tags.added diff --git a/python/loot/__init__.py b/python/loot/__init__.py new file mode 100644 index 0000000..4733f4a --- /dev/null +++ b/python/loot/__init__.py @@ -0,0 +1 @@ +from .loot import * diff --git a/python/loot_api/__init__.py b/python/loot_api/__init__.py deleted file mode 100644 index 59c3088..0000000 --- a/python/loot_api/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .loot_api import * diff --git a/python/setup.py b/python/setup.py index 5da6d20..8a00d81 100644 --- a/python/setup.py +++ b/python/setup.py @@ -67,15 +67,15 @@ if not is_msvc_redist_installed(*MSVC_MIN_VERSION): # The version string is substituted in by CMake. setup( - name="loot-api", + name="libloot-python", version="@LIBLOOT_PY_VERSION_MAJOR@.@LIBLOOT_PY_VERSION_MINOR@.@LIBLOOT_PY_VERSION_PATCH@", - description="A Python module that wraps the LOOT API.", + description="A Python module that wraps libloot.", long_description=long_description, long_description_content_type="text/markdown", - url="https://github.com/loot/loot-api-python", + url="https://github.com/loot/libloot-python", packages=find_packages(), include_package_data=True, - package_data={"loot_api": ["loot_api*.pyd", "loot.dll"]}, + package_data={"loot": ["loot*.pyd", "loot.dll"]}, distclass=BinaryDistribution, classifiers=[ 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', diff --git a/src/convenience.h b/src/convenience.h index b606620..e39ceab 100644 --- a/src/convenience.h +++ b/src/convenience.h @@ -22,8 +22,8 @@ along with LOOT. If not, see . */ -#ifndef LOOT_API_PYTHON_CONVENIENCE -#define LOOT_API_PYTHON_CONVENIENCE +#ifndef LIBLOOT_PYTHON_CONVENIENCE +#define LIBLOOT_PYTHON_CONVENIENCE #include diff --git a/src/main.cpp b/src/main.cpp index cb638bb..36ecc14 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -175,8 +175,8 @@ void bindFunctions(pybind11::module& module) { } } -PYBIND11_MODULE(loot_api, module) { - module.doc() = "A Python module that wraps the LOOT API, generated by pybind11."; +PYBIND11_MODULE(loot, module) { + module.doc() = "A Python module that wraps libloot, generated by pybind11."; loot::bindEnums(module); loot::bindClasses(module); diff --git a/src/plugin_cleanliness.h b/src/plugin_cleanliness.h index 58f4a0b..c164467 100644 --- a/src/plugin_cleanliness.h +++ b/src/plugin_cleanliness.h @@ -21,11 +21,11 @@ along with LOOT. If not, see . */ -#ifndef LOOT_PLUGIN_CLEANLINESS -#define LOOT_PLUGIN_CLEANLINESS +#ifndef LIBLOOT_PYTHON_PLUGIN_CLEANLINESS +#define LIBLOOT_PYTHON_PLUGIN_CLEANLINESS /** - * The namespace used by the LOOT API. + * The namespace used by libloot. */ namespace loot { /** diff --git a/src/plugin_tags.h b/src/plugin_tags.h index ef45b5d..349ed05 100644 --- a/src/plugin_tags.h +++ b/src/plugin_tags.h @@ -21,8 +21,8 @@ along with LOOT. If not, see . */ -#ifndef LOOT_PLUGIN_TAGS -#define LOOT_PLUGIN_TAGS +#ifndef LIBLOOT_PYTHON_PLUGIN_TAGS +#define LIBLOOT_PYTHON_PLUGIN_TAGS #include #include diff --git a/src/wrapper_version.h b/src/wrapper_version.h index b53a710..fb9cbd0 100644 --- a/src/wrapper_version.h +++ b/src/wrapper_version.h @@ -22,8 +22,8 @@ along with LOOT. If not, see . */ -#ifndef LOOT_API_PYTHON_WRAPPER_VERSION -#define LOOT_API_PYTHON_WRAPPER_VERSION +#ifndef LIBLOOT_PYTHON_WRAPPER_VERSION +#define LIBLOOT_PYTHON_WRAPPER_VERSION #include diff --git a/test/test.py b/test/test.py index 2564e87..335d171 100644 --- a/test/test.py +++ b/test/test.py @@ -9,15 +9,15 @@ import unittest sys.path.append(os.getcwd()) -from loot_api import Version -from loot_api import WrapperVersion -from loot_api import GameType -from loot_api import SimpleMessage -from loot_api import MessageType -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 import Version +from loot import WrapperVersion +from loot import GameType +from loot import SimpleMessage +from loot import MessageType +from loot import PluginCleanliness +from loot import create_game_handle +from loot import is_compatible +from loot import set_logging_callback def logging_callback(level, message): pass