Python bindings for libdigidocpp via SWIG. Produces installable wheels for creating, validating, and handling digitally signed documents (ASiC-E, BDOC, etc).
libdigidocpp/— upstream C++ library as a git submodule (pinned to v4.3.0)CMakeLists.txt— builds upstream statically, then builds SWIG Python moduleswig/pydigidoc.i— thin wrapper:%renamefor snake_case +%include "libdigidocpp.i"src/pydigidoc/__init__.py— re-exports SWIG symbols, wrapsinitialize()to use bundled schema files- Schema files are bundled in the wheel under
pydigidoc/schema/
- Static linking (
BUILD_SHARED_LIBS=OFF) — self-contained wheels, LGPL-2.1 compliance via RELINKING.md + sdist source ANDROID=TRUEhack in CMake — skips upstreaminstall(EXPORT)which fails with static builds- Symlinks (
etc/,cmake/) created at configure time — upstream usesCMAKE_SOURCE_DIRwhich points to our root, not the submodule - SWIG
%renamebefore%include— order matters, upstream.ideclares%module(directors="1") digidoc
uv sync --dev
uv run pytest tests/ -v# System deps (Ubuntu): libssl-dev libxml2-dev zlib1g-dev libxmlsec1-dev
uv build --wheelUses scikit-build-core as the build backend bridging CMake. Requires C++23, SWIG 4.0+, CMake 3.20+.
Never use git -C <path> — always run git commands from the working directory.
.github/workflows/build.yml — 4 jobs:
build— every push, Ubuntu onlybuild_wheels— on release, cibuildwheel v3.3.1 across Linux/macOS/Windowsbuild_sdist— on releasepublish— OIDC trusted publishing to PyPI
Linux wheels build OpenSSL and xmlsec1 from source inside manylinux_2_28 with GCC 13.
bump-my-version configured in pyproject.toml. Updates version in pyproject.toml, __init__.py, and CMakeLists.txt, commits, and tags.