On 25. 04. 26 2:46, Charalampos Stratakis via python-devel wrote:
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

Hi.

I wonder, now that we have long options available for the %pyproject macros, whether we should update this to work like:

%pyproject_patch_dependency cython --drop-upper
%pyproject_patch_dependency numpy --set-upper=3.0
%pyproject_patch_dependency legacy-dep --ignore
%pyproject_patch_dependency sibling-package --ignore --br-only


Behind the scenes, this could still work the same way. WDYT?

--
Miro Hrončok
--
Phone: +420777974800

--
_______________________________________________
python-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to