ProductMD is a Python library for parsing and creating metadata files for OS installation media and compose outputs. It provides structured access to .treeinfo, .discinfo, and compose metadata files used in Fedora, RHEL, and other RPM-based Linux distributions.
- Compose Metadata - Parse and manipulate compose information, RPM manifests, module metadata, and image manifests
- TreeInfo - Read and write
.treeinfofiles describing installable trees - DiscInfo - Handle
.discinfofiles for installation media identification - HTTP Support - Load metadata directly from remote URLs
- Validation - Built-in schema validation for metadata integrity
Full documentation is available at productmd.readthedocs.io.
This project uses uv for dependency management.
# Run the full test suite
uvx tox
# List available test environments
uvx tox list
# Run a specific environment
uvx tox -e py312Important
Python 3.6 is EOL and incompatible with modern tooling. Use the provided container for legacy testing:
podman build -f Containerfile.py36 -t productmd-py36-test .
podman run --rm productmd-py36-testFor an interactive shell: podman run --rm -it productmd-py36-test /bin/bash
# Run linter
uvx tox -e lint
# Run formatter
uvx tox -e format
# Run security scanner
uvx tox -e bandituv buildThis will generate the source and wheel packages under the dist directory.
To release a new version and publish to PyPI:
-
Bump the version in
pyproject.toml:uv version <new_version>
See uv version docs for other version commands (e.g.,
uv version --bump minor). -
Commit and push the version change:
git add pyproject.toml uv.lock git commit -m "Bump version to <new_version>" git push origin master -
Create a GitHub release:
- Go to Releases and click "Create a new release"
- Pin the release to a tag following the format
vX.X(e.g.,v1.0,v2.1) - Fill in the release title and notes
- Click "Publish release"
-
Automated publishing:
- Publishing the release triggers the CI pipeline
- If CI passes, the CD pipeline automatically builds and publishes the package to PyPI
This project is licensed under the GNU Lesser General Public License v2.1.