The GitHub Action was failing during the dependency installation step with the error:
No match for argument: python3-venv
Error: Unable to find a match: python3-venv
Error: Process completed with exit code 1.
In CentOS Stream 9, the python3-venv package doesn't exist as a separate package. The venv module is included directly in the base python3 package, unlike some other distributions where it's packaged separately.
File: .github/workflows/build-rpm.yml
Changed:
# OLD - BROKEN
python3-venv \
# NEW - WORKING
python3-devel \File: RPM_PACKAGING.md
- Updated prerequisite package lists
- Added specific troubleshooting section for this error
- Corrected build dependency documentation
-
python3-devel: Provides Python development headers needed for compiling native extensions (required by PyInstaller and some PyQt5 components) -
Built-in venv: The
venvmodule is available directly viapython3 -m venvwithout needing additional packages -
CentOS Stream 9 compatibility: Uses packages that actually exist in the CentOS Stream 9 repositories
| Distribution | Virtual Environment Package | Development Headers |
|---|---|---|
| CentOS Stream 9 | Built into python3 |
python3-devel |
| CentOS/RHEL 8 | Built into python3 |
python3-devel |
| Ubuntu/Debian | python3-venv |
python3-dev |
| Fedora | Built into python3 |
python3-devel |
error: Empty %files file /github/home/rpmbuild/BUILD/python-gui-menu-1.0.2/debugsourcefiles.list
RPM was trying to create debug packages for debugging information, but since we're packaging a pre-built PyInstaller executable (not compiling from source), there are no debug source files to include.
Added debug package disabling directives to the RPM spec file:
%global _enable_debug_package 0
%global debug_package %{nil}
After applying this fix, the GitHub Action should:
- ✅ Successfully install all system dependencies
- ✅ Create virtual environment using
python3 -m venv - ✅ Build the application using PyInstaller
- ✅ Create RPM package successfully (no debug package errors)
- ✅ Pass installation tests
To test locally on CentOS Stream 9:
# Verify the correct packages are available
dnf search python3-devel
dnf info python3
# Test venv creation
python3 -m venv test_env
source test_env/bin/activate
pip install --upgrade pip
deactivate
rm -rf test_envThis fix ensures compatibility with CentOS Stream 9's package structure while maintaining the cross-platform enhanced build functionality.