mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
604c50d3b384ac9e6aac55379cde7e7a7162b9dd
ModOrganizer2 - Python Proxy
This repository contains the Python proxy plugin for ModOrganizer2. The proxy plugin allow developers to write Python plugins for ModOrganizer2.
Setup, build, tests
This repository is part of MO2 main repositories and should usually be build using
mob.
Organization
This repositories contains 5 sub-projects in src.
The interface between Python and C++ is done using the
pybind11 library.
src/proxycontains the actual proxy plugin. This project is a simple interface between MO2 and the runner (see below).- This project generates the
plugin_python.dlllibrary. - TODO: this project generates the translation file (-> moved the file).
- TODO: this project install necessary files for the plugin (Python DLL, Python
libraries, etc), INCLUDING
mobase.
- This project generates the
src/runnercontains the Python runner. This is the project that instantiates a Python interpreter and load/unload Python plugins.- TODO: static library
- `src/pybind11-qt contains many utility stuff to interface pybind11 with Qt and PyQt.
src/pybind11-utilscontains some utility stuff pybind11. This project is header-only.- `src/mobase contains the Python plugin interface.
- This projects generates the
mobasePython library.
- This projects generates the
Some (woefully incomplete) tests are available under tests, split in three
sub-directories:
tests/mockssimply contains mocks ofuibaseinterfaces to be used in the two other test projects.tests/pythoncontains Python tests forpytest. This project generates a bunch of Python test libraries that are then imported in Python test files (test_*.py) and tested usingpytest. These tests mostly cover the pybind11 Qt and utility stuff, and some standalone MO2 classes and functions (IFileTree,GuessedString, etc).tests/runnercontains C++ tests, using GTest Tests in this project instantiate a Python runner and then use it to check that plugins implemented in Python can be used properly on the C++ side.
Languages
C++
86.1%
Python
9.8%
CMake
4.1%