This project uses pixi for environment management:
# Install dependencies
pixi install
# Run tests
pixi run test
# Generate RPM spec file
pixi run generate-specThe project uses two version sources:
- Python package version:
setuptools-scmderives the version from git tags - RPM spec version: Extracted from the first changelog entry in
rpm/python-cvmfsutils.spec.in
The RPM spec file is generated from a template to avoid external macros in the OpenSUSE Build System (OBS):
- Template:
rpm/python-cvmfsutils.spec.incontains@VERSION@placeholders - Generator:
generate_spec.pyextracts the version from the first changelog entry - Output:
rpm/python-cvmfsutils.specis the generated file (checked into git for OBS)
The changelog is the single source of truth for the RPM version.
-
Update the changelog in
rpm/python-cvmfsutils.spec.inwith the new version:%changelog * Wed Jan 29 2026 Your Name <email@example.com> - 0.6.0-1 - Release notes here -
Regenerate the spec file:
pixi run generate-spec
-
Commit both files, tag, and release:
git add rpm/python-cvmfsutils.spec.in rpm/python-cvmfsutils.spec git commit -m "release: 0.6.0" git tag v0.6.0 git push --tags
The GitHub Actions workflows automatically:
- Verify the checked-in spec matches the generated output
- Build RPMs for AlmaLinux 8/9 and openSUSE Leap/Tumbleweed
- Test installation and functionality
- Publish to PyPI on release
The generated spec file works with OBS without requiring external macros:
- No
%{version}macro usage - version is embedded directly - Spec file is checked into git so OBS can read it
- Template-based generation ensures consistency
- Source layout: Code is in
src/cvmfs/following modern Python packaging standards - Console scripts: Utilities are defined as entry points in
setup.cfg - Dependencies: Declared in
setup.cfgwith appropriate version constraints
CI tests across multiple platforms:
- Python versions: 3.8-3.12
- Operating systems: Ubuntu, macOS (Intel/ARM)
- RPM builds: AlmaLinux 8/9, openSUSE Leap 15.5/15.6, openSUSE Tumbleweed
Local testing:
# Run test suite
pixi run test
# Test RPM spec generation
pixi run generate-spec