Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 1.24 KB

File metadata and controls

27 lines (17 loc) · 1.24 KB

Embedded Python via Python/C API

This library provides python functionality in beth by using the 🔗Python/C API .

Prerequisites

  • Install python packages:

    • sudo apt install python3-dev
    • sudo apt install python3-matplotlib
  • One can use python3-config for release settings in the makefile:

    • python3-config --embed --cflags for compiler flags

      • Additional compiler flags to counteract some undesired python3-config settings: -Wno-sign-compare -Wno-comment
    • python3-config --embed --ldflags for linker flags

  • Debug mode: python3-config does not seem to offer a dedicated debug mode. Workaround: Dissect the returned flags and adapt them to the desired debug settings. Only compiler flags need modifications. Following additional settings work for the current python3 release (might change in future)

    • -I/usr/include/python3.10 -fstack-protector-strong

Features and Interfaces

  • Object Interface: Low level interface for conversions across beth objects and python objects.
  • Plotting Interface: Wrapper of functionality in the matplotlib.pyplot package.

© 2024 Johannes B. Steffens