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,
To deliver Python 3.15 with Fedora Linux 45, we will run a coordinated
rebuild in a side tag.
https://fedoraproject.org/wiki/Changes/Python3.15
Python 3.15.0b2 is scheduled for tomorrow - Tuesday, Jun 2nd 2026.
We hope to start the mass rebuild shortly after it's available.
TL;DR: If you can, for the period of the mass rebuild just **don't build
your Python packages in rawhide**.
We will let you know when the side tag rebuild actually starts and when
it is merged and it's safe to build in rawhide with Python 3.15.
Details:
If you see a "Rebuilt for Python 3.15" (or similar) commit in your package,
please don't rebuild it in regular rawhide or another rawhide side tag.
If you need to, please let us know, so we can coordinate.
If you'd like to build a package after we already rebuilt it, you should
be able to build it in the side tag via:
on branch rawhide:
$ fedpkg build --target=f45-python
$ koji wait-repo f45-python --request --build <nvr>
It takes time to build all the essential packages,
so don't expect all your dependencies to be available right away.
Any attempts to build your packages in the side tag before we do will
likely fail due to missing dependencies.
When in trouble, ask here or on Fedora's Matrix - Fedora Python room
(https://matrix.to/#/#python:fedoraproject.org)
Ping me (ksurma) or Miro (mhroncok) if you need to talk to us.
Builds will appear here:
https://koji.fedoraproject.org/koji/builds?latest=0&tagID=f45-python&inheri…
Please avoid any potentially disturbing or major changes in Python
packages until the rebuild is over.
Thanks!
Karolina