Hello folks,
Tired of figuring out the right sed or patch to modify dependency
constraints in your Python packages? Or having your carefully crafted regex
break because upstream reformatted their metadata?
%pyproject_patch_dependency is here to help.
A new macro has been merged into pyproject-rpm-macros and is available in
Rawhide, F44 and F43 as a provisional feature. It provides a uniform way to
override upstream dependency constraints in %prep, regardless of the build
backend. It affects both BuildRequires and runtime Requires.
Example usage:
%prep
%autosetup -p1
%pyproject_patch_dependency cython:drop_upper
%pyproject_patch_dependency numpy:set_upper:3.0
%pyproject_patch_dependency legacy-dep:ignore
It also handles circular/sibling dependencies in multi-wheel specs via the
br_only suffix. A sibling package can be ignored in BuildRequires (since
it's not yet installed during build) while keeping it as a runtime Requires:
%pyproject_patch_dependency sibling-package:ignore:br_only
The feature is marked provisional, meaning the API may change based on
real-world usage. If you maintain Python packages and deal with dependency
version overrides, I'd appreciate if you gave this a try and reported any
issues.
Documentation (Provisional: Overriding dependency constraints section)
<https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/READ…>
<https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/READ…>
Implementation
<https://src.fedoraproject.org/rpms/pyproject-rpm-macros/c/5d9798f289ea8cbeb…>
F44 bodhi update
<https://bodhi.fedoraproject.org/updates/FEDORA-2026-c50219cb79>
F43 bodhi update
<https://bodhi.fedoraproject.org/updates/FEDORA-2026-051d1b3285>
--
Regards,
Charalampos Stratakis
Senior Software Engineer
Python Maintenance Team, Red Hat
Hello,
In the released Python 3.15.0b4 there was an incompatible ABI change[0]
that forces us to one more rebuild of the packages with extension
modules in a side tag.
More precisely, we are rebuilding packages depending on python(abi) =
3.15 and libpython3.15.so.1.0()(64bit) that contain ".so" files or are
installed into %python3_sitearch. There is about 750 packages in this
targeted rebuild.
We plan to do it tomorrow (July 22, 2026).
Please, don't build your Python packages with extension modules in
Rawhide until we confirm the side tag was merged. The rebuild will
happen in f45-build-side-144323.
Cheers,
Karolina
[0]: https://github.com/python/cpython/pull/152448