File python-autopep8.changes of Package failed_python-autopep8
Repair summary for package: failed_python-autopep8
Root cause:
- The RPM spec parser failed with "syntax error in expression" at line ~37. Investigation showed an invalid inline conditional expression used in the spec (attempted to put a conditional inside a macro invocation), which is not valid RPM syntax and caused the parser to abort the build early.
Fix applied (minimal change):
- Edited file: python-autopep8.spec
- Replaced the inline conditional usage with explicit RPM %if/%endif blocks to conditionally add BuildRequires and Requires for tomli when building with Python < 3.11. This matches typical spec usage and avoids parser errors.
Spec changes (summary):
- Before (problematic lines):
BuildRequires: %{python_module tomli if %python-base < 3.11}
Requires: python-tomli if %python-base < 3.11
- After (fixed):
%if %{python_version_nodots} < 311
BuildRequires: %{python_module tomli}
%endif
...
%if %{python_version_nodots} < 311
Requires: python-tomli
%endif
Notes and next steps:
- This fix addresses the spec parsing error that caused an early build failure. The original build also showed 3 failing unit tests during %check (3 failures, 550 passed). If the build reaches %check again, those test failures will need to be investigated separately in the package source (autopep8) itself.
Files modified:
- temp_workspace/failed_python-autopep8/python-autopep8.spec
- temp_workspace/failed_python-autopep8/python-autopep8.changes (this file written with the repair report)
Timestamp: 2025-08-29