You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor static dependency builder and cache dependency archives in CI
Extract static dependency preparation into a reusable builder and wire CI to
reuse downloaded archives across jobs/platforms. This reduces duplicated build
logic, improves maintainability, and speeds up wheel/sdist workflows.
- Introduce `build_support/lib_xmlsec_dependency_builder.py`:
- Centralize dependency version resolution, source/archive download, extract,
and build steps for OpenSSL, zlib, libiconv, libxml2, libxslt, and xmlsec1.
- Support both Unix and Windows dependency preparation paths.
- Preserve cross-compilation handling via `CrossCompileInfo` (now a dataclass).
- Expose resolved library versions for callers.
- Add `build_libs_xmlsec.py` CLI:
- Provide a standalone entrypoint to prepare dependencies.
- Support `--download-only`, custom `--libs-dir`, custom `--buildroot`,
and target platform/plat-name overrides.
- Refactor `build_support/static_build.py`:
- Delegate dependency preparation to `LibXmlsecDependencyBuilder`.
- Keep extension configuration focused on platform-specific compiler/linker
flags and include/lib wiring.
- Preserve static-link behavior while removing duplicated dependency logic.
- Update `build_support/build_ext.py`:
- Initialize build flags (`PYXMLSEC_ENABLE_DEBUG`, `PYXMLSEC_STATIC_DEPS`,
`PYXMLSEC_OPTIMIZE_SIZE`) in `__init__`.
- Keep build flow unchanged, but use the refactored static helper path.
- Modernize packaging metadata:
- Move project metadata from `setup.py` into PEP 621 fields in
`pyproject.toml` (`[project]`, `[project.urls]`, `[tool.setuptools]`).
- Simplify `setup.py` to extension setup only.
- Delete legacy `setup.cfg`.
- Relax build-system pins and align build requirements with setuptools_scm>=8.
- Bump `ruff[format]` in `requirements-test.txt` to `0.14.4`.
- Add reusable dependency-cache workflow:
- New `.github/workflows/cache_libs.yml` workflow_call job that downloads and
caches `libs/*.{xz,gz,zip}` per OS/arch/version inputs.
- Export cache/version outputs for downstream jobs.
- Validate expected Windows archive filenames.
- Rework wheel/manylinux CI to consume cached libs:
- `manylinux.yml` now depends on `cache_libs`, restores cache, and runs build
+ test inside container via new script
`.github/scripts/manylinux_build_and_test.sh`.
- Script sets `PYTHONPATH` and `PYXMLSEC_LIBS_DIR` explicitly so isolated PEP
517 builds can import local helpers and reuse cached archives.
- `wheels.yml` now depends on `cache_libs`, restores cache before
cibuildwheel, updates action versions, and refreshes matrix generation
(`generate_wheels_matrix`) including ARM Linux runner mapping.
- `sdist.yml` installs `setuptools_scm>=8` during build deps setup.
- Minor workflow hygiene updates:
- Normalize formatting and small ordering/conditional tweaks in
`linuxbrew.yml` and `macosx.yml`.
0 commit comments