-
Story
-
Resolution: Won't Do
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
-
Package 'pendulum' does not build as-is via the AIPCC self-service pipeline and requires builder repository onboarding.
Build Failure Summary
Root Cause Analysis: `pendulum` 3.2.0 Build Failure
What happened
The build of pendulum 3.2.0 failed because Cargo could not download Rust crate dependencies during a network-isolated build.
Pendulum 3.2.0 includes a Rust extension built via maturin. During the `prepare_metadata_for_build_wheel` step, maturin invoked Cargo, which attempted to fetch the `pyo3` crate from `crates.io`. The build was executed inside `fromager`'s network isolation wrapper (`run_network_isolation.sh`), which blocked all outbound network access, causing DNS resolution to fail:
pendulum: Updating crates.io index pendulum: warning: spurious network error (3 tries remaining): [6] Couldn't resolve host name (Could not resolve host: index.crates.io) pendulum: warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: index.crates.io) pendulum: warning: spurious network error (1 try remaining): [6] Couldn't resolve host name (Could not resolve host: index.crates.io) pendulum: error: failed to get `pyo3` as a dependency of package `_pendulum v3.2.0 (/mnt/work-dir/pendulum-3.2.0/pendulum-3.2.0/rust)`
This ultimately caused maturin to fail:
pendulum: 💥 maturin failed pendulum: Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
Why it failed
- Pendulum 3.2.0 uses maturin as its PEP 517 build backend for compiling a Rust extension (`rust/` subdirectory with a dependency on `pyo3`).
- The `fromager` build pipeline enforces network isolation during wheel builds to ensure reproducibility and security.
- Cargo requires access to `index.crates.io` to resolve and download Rust crate dependencies (e.g., `pyo3`), which is blocked under network isolation.
- The Rust crate dependencies were not pre-vendored, so Cargo had no local source to resolve them from.
What is needed to fix it
The Rust/Cargo dependencies must be made available offline before the network-isolated build begins. This means:
- Vendor the Cargo dependencies: Run `cargo vendor` on the pendulum source tree before entering the network-isolated build phase. This downloads all crate dependencies into a local `vendor/` directory and generates a `.cargo/config.toml` that points Cargo to use the vendored sources instead of `crates.io`.
- The `fromager` pipeline would need a pre-build step (or plugin/hook) that handles Cargo dependency vendoring for maturin-based packages, similar to how it already resolves and pre-downloads Python build-system dependencies.
Packaging Analysis Summary
Executive Summary: pendulum 3.2.0 Build Analysis
pendulum 3.2.0 is a Python datetime library with moderate build complexity (5/10). The package includes an optional Rust native extension (compiled via maturin/PyO3) for performance-optimized date parsing and calculation. Critically, pendulum provides a complete pure-Python fallback — the Rust extension is entirely optional. The upstream project publishes both platform-specific wheels and a universal py3-none-any.whl on PyPI. The package is required by apache-airflow-core>=3.1.0 (tracked in AIPCC-10388), and version 3.2.0 satisfies that constraint. The MIT license is fully compatible with Red Hat redistribution, and all transitive runtime dependencies (python-dateutil, tzdata) are permissively licensed and pure Python.
Two viable build strategies exist. The preferred approach is building from source with the Rust toolchain to produce a manylinux2014_x86_64 wheel with the performance extension. This requires only the Rust stable toolchain (1.63+) and maturin>=1.0,<2.0 — no C/C++ compiler or system library headers are needed beyond python3-devel. Alternatively, the upstream CI demonstrates a pure-Python build path by swapping the build backend from maturin to poetry-core>=2.0.0, producing a universal wheel with zero compilation requirements. Both approaches are proven in upstream CI and actively tested.
# Rust extension build (preferred): pip install "maturin>=1.0,<2.0" maturin build --release --interpreter python3.10 python3.11 python3.12 python3.13 # Pure-Python fallback build (alternative): sed -i 's/maturin/poetry-core/g' pyproject.toml # swap build backend python -m build --wheel # Produces: pendulum-3.2.0-py3-none-any.whl
There are no critical blockers for the target configuration (x86_64 Linux, Python 3.10+). All previously reported critical issues — including Rust arithmetic overflow (#787) and Alpine segfault (#785) — are resolved in 3.2.0. Runtime dependencies are minimal: only python-dateutil>=2.6 and tzdata>=2020.1, both pure Python with no compilation requirements. The pytz dependency was removed in 3.2.0, simplifying the dependency tree. The PENDULUM_EXTENSIONS=0 environment variable can force pure-Python mode at runtime if needed, and is automatically activated when the native extension is absent. For AIPCC-10855, version 3.2.0 is the recommended target — it is the latest stable release (2026-01-30), supports Python 3.10–3.14, and aligns with the Red Hat AI platform baseline.
- is blocked by
-
AIPCC-10859 Add pendulum into the RHAI pipeline onboarding collection
-
- In Progress
-
- mentioned on