-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
-
Package 'alchemy-config' does not build as-is via the AIPCC self-service pipeline and requires builder repository onboarding.
Build Failure Summary
Root Cause Analysis: `alchemy-config` Build Failure
Package: `alchemy-config==1.1.3`
Build phase: `get_requires_for_build_wheel` (determining build backend dependencies)
—
What Happened
The build failed with a `FileNotFoundError` when setuptools attempted to execute the package's `setup.py`:
FileNotFoundError: [Errno 2] No such file or directory:
'/mnt/work-dir/alchemy_config-1.1.3/alchemy_config-1.1.3/requirements.txt'
The traceback shows that setuptools' `run_setup()` executed the `setup.py` script, which at line 15 attempts to read a `requirements.txt` file. This file is not present in the extracted source directory.
—
Why It Failed
The `alchemy-config` `setup.py` hard-codes a dependency on reading `requirements.txt` at build time (a common anti-pattern). The file is either:
1. Not included in the sdist — the `MANIFEST.in` or `pyproject.toml` for the package does not ensure `requirements.txt` is packaged into the source distribution, or
2. The working directory differs from what `setup.py` expects — the `setup.py` uses a relative path like `open("requirements.txt")` rather than resolving relative to `_file_`.
Since this error occurs during the `get_requires_for_build_wheel` hook — before any actual wheel building — the build cannot even determine what dependencies are needed.
—
How to Fix
- Add a `fromager` patch (or an override) for `alchemy-config` that injects the missing `requirements.txt` into the extracted source tree before the build runs. This can be done via a post-unpack hook that either:
- Copies the `requirements.txt` from the project's repository into the source directory, or
- Generates a `requirements.txt` with the known runtime dependencies (the package's PyPI metadata lists `PyYAML` and `jsonschema` as dependencies).
- Alternatively, apply a source patch to `setup.py` that removes the `requirements.txt` read and instead inlines the dependency list. For example, replacing the file-read block with a static list:
```python
install_requires = ["PyYAML>=6.0", "jsonschema>=4.0"]
```
This is a straightforward fix since `alchemy-config` is a pure-Python package with only two runtime dependencies.
Packaging Analysis Summary
Here is the executive summary formatted as a JIRA comment in JIRA wiki markup:
Executive Summary: alchemy-config Package Analysis
alchemy-config is a pure Python package providing YAML-based configuration management with environment variable overrides. It is a direct dependency of caikit (>=1.1.1,<2.0.0) and has been assessed as Simple complexity (1/10) with no blockers for Red Hat onboarding. The entire package consists of only ~400 lines of Python across two source files, requires no native compilation, and produces a universal py3-none-any wheel. Version 1.1.3 (latest, released 2024-01-30) is the appropriate target. The package is MIT-licensed, fully compatible with Red Hat distribution requirements.
The build process is straightforward with one notable quirk: setup.py requires the RELEASE_VERSION environment variable to be set at build time, or the build will fail with an AssertionError. For RPM packaging, this is resolved by setting RELEASE_VERSION=%{version} in the %build section. The sole runtime dependency is PyYAML (>=5.3.1), which is already available in RHEL as python3-pyyaml. There are no C extensions, no system library dependencies, and no platform constraints. The recommended build command is:
export RELEASE_VERSION=1.1.3 python setup.py sdist bdist_wheel
The package has a solid test suite (28 tests, 98% coverage, all passing) and no critical open issues. The only open GitHub issues are a feature request for list support in environment variable overrides (#2) and the RELEASE_VERSION build quirk (#9), both with known workarounds. Note: the package uses legacy setup.py without pyproject.toml, which emits deprecation warnings but builds successfully with modern tooling. The dependency chain is minimal (caikit -> alchemy-config -> PyYAML), the codebase is stable, and the risk of breaking changes is low. Target delivery for AIPCC-10922 by 2026-03-18 is entirely feasible given the simplicity of this package.
- blocks
-
AIPCC-10927 Add alchemy-config into the RHAI pipeline onboarding collection
-
- In Progress
-
- mentioned on