-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
-
Package 'alchemy-logging' does not build as-is via the AIPCC self-service pipeline and requires builder repository onboarding.
Build Failure Summary
Root Cause Analysis: `alchemy-logging` Build Failure
Package: `alchemy-logging==1.5.0`
Build phase: `get_requires_for_build_wheel` (early metadata/dependency resolution stage)
—
What Failed
The build failed because `alchemy-logging`'s `setup.py` requires the environment variable `PYTHON_RELEASE_VERSION` to be set, and it was not present in the build environment.
The relevant error from the traceback:
File "<string>", line 37, in <module>
AssertionError: Must set PYTHON_RELEASE_VERSION
The failure occurs very early — during `get_requires_for_build_wheel` — because setuptools executes `setup.py` to determine build dependencies, and the `assert` on line 37 of `setup.py` halts execution before any actual compilation begins.
—
What This Means
The `alchemy-logging` package uses a mandatory environment variable (`PYTHON_RELEASE_VERSION`) in its `setup.py` as part of its build configuration. This is a deliberate gate by the package authors — the package cannot be built (or even have its metadata queried) without this variable.
—
How to Fix It
Set the `PYTHON_RELEASE_VERSION` environment variable to the appropriate version string before invoking the build. For example, if building for a `1.5.0` release:
export PYTHON_RELEASE_VERSION="1.5.0"
The exact expected value would need to be determined by inspecting the `setup.py` of `alchemy-logging==1.5.0` to see how `PYTHON_RELEASE_VERSION` is used (e.g., whether it expects a semver string, a simple version number, etc.). This can be done by examining the sdist at `/mnt/sdists-repo/downloads/alchemy-logging-1.5.0.tar.gz`.
In the build pipeline (fromager/bootstrap), this environment variable should be configured either:
- In the build environment settings for the `alchemy-logging` package
- Via a package-specific patch or override that sets the variable before `setup.py` is executed
Packaging Analysis Summary
Here is the executive summary formatted as a JIRA comment in JIRA wiki markup:
Executive Summary: alchemy-logging (alog) Packaging Analysis
alchemy-logging (PyPI: `alchemy-logging`, import: `alog`) is a Simple complexity pure-Python logging framework maintained by IBM. It carries a 1/10 complexity score with zero native compilation requirements, zero system library dependencies, and — for Python 3.8+ — zero runtime dependencies. The resulting wheel is tagged `py3-none-any`, meaning a single build serves all platforms and architectures. The license is MIT, fully compatible with Red Hat redistribution. This package is one of the most straightforward onboarding candidates in the pipeline.
The single critical blocker for building from source is the `setup.py`'s unconditional requirement for the `PYTHON_RELEASE_VERSION` environment variable. Without it, any build invocation fails with an `AssertionError`. This is by design — IBM's CI injects the version at release time rather than hardcoding it. For the RHEL AI wheels pipeline (MR !1953), the fix is a one-line configuration change:
PYTHON_RELEASE_VERSION=1.5.1 pip wheel --no-deps -w dist .
Note that the repository is a multi-language monorepo; the Python source resides exclusively in `src/python/`, and build scripts must target that subdirectory — not the repository root.
Version 1.5.1 (latest, released 2025-12-18) is the recommended target. It fixes a `utcfromtimestamp` deprecation warning affecting Python 3.12+ (#597). One additional note: version 1.5.1 was published to PyPI without an sdist, so building from source requires cloning the git repository rather than downloading from PyPI. The pre-built `py3-none-any` wheel on PyPI is a valid fallback since pure-Python wheels are platform-independent. Also be aware that an unrelated `alog` package exists on PyPI — ensure dependency resolution pulls `alchemy-logging`, not the separate `alog` project.
Key Recommendations for Onboarding (AIPCC-10923)
- Set `PYTHON_RELEASE_VERSION=1.5.1` as a build environment variable — this is the only required customization
- Build from `src/python/` within the git checkout, not the repository root
- Mark as noarch / universal — no architecture-specific builds needed despite the ticket specifying x86_64
- This package feeds the caikit dependency chain (AIPCC-10389) and introduces zero transitive dependency complexity
- Validate with: `python -c "import alog; alog.configure('info')"` as a basic smoke test
- blocks
-
AIPCC-10928 Add alchemy-logging into the RHAI pipeline onboarding collection
-
- In Progress
-
- mentioned on