dlr-gtlab / python-module

GTlab Module for embadding Python into GTlab
0 stars 0 forks source link

drawing Python Module

This module embeds Python into GTlab. Python is an interpreted programming language that is suitable for script programming. Scripts are small programs that are usually implemented within one source code file. A Python Interpreter reads the source code file and executes the instructions defined in them. The Python Module offers the possibility to define and execute process chains by using Python. This increases the flexibility of process chains and enables the extension of GTlab's preliminary design calculation methods without source code access and C++ knowledge. To use these advantages the Python Module extends GTlab by the following three interfaces.

License

The largest portion of the code is licensed under the Apache 2.0 License.

Smaller thirdparty party code part of code base uses other permissive licenses, such as the BSD and MIT licenses. Please review the directory LICENSES and .reuse for a full overview on all licensed used.

Compiling from Source

Prerequisites

A working GTlab installation is required. This includes GTlab and the GTlab Logging library. In addition, the Qt toolkit need to be installed to build the Python module.

The Python module uses the PythonQt library to embed the Python interpreter into GTlab and provide access to GTlab's data model structure and the slots of all classes. PythonQt will be automatically downloaded and built by the Python module. If you want to use your own installation of PythonQt, use BUILD_BUNDLED_PYTHONQT=OFF in the CMake configuration.

Library Version Bundled Where to get
Qt 5.15.x No https://download.qt.io/official_releases/qt/
GTlab Core + Logging >= 2.0 No https://github.com/dlr-gtlab/gtlab-core
Python 3.9.x No https://www.python.org/downloads/
PythonQt >= 3.5.0 Yes https://github.com/MeVisLab/pythonqt

Building

The python module requires a recent CMake (>3.15) to build. The configuration and build process is similar to other CMake builds:

cmake -S . -B build_dir -DQt5_DIR=<path/to/cmake/Qt5> -DCMAKE_PREFIX_PATH=<path/to/gtlab_install> -DCMAKE_INSTALL_PREFIX=<path/to/gtlab_install>
cmake --build build_dir
cmake --build build_dir --target install