pythondistdeps.py: When parsing extras name, take the rightmost +
This commit is contained in:
parent
d1a02fdda7
commit
7398b71fbc
@ -1,7 +1,7 @@
|
|||||||
Name: python-rpm-generators
|
Name: python-rpm-generators
|
||||||
Summary: Dependency generators for Python RPMs
|
Summary: Dependency generators for Python RPMs
|
||||||
Version: 11
|
Version: 11
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
|
|
||||||
# Originally all those files were part of RPM, so license is kept here
|
# Originally all those files were part of RPM, so license is kept here
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -47,6 +47,9 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} *.py
|
|||||||
%{_rpmconfigdir}/pythonbundles.py
|
%{_rpmconfigdir}/pythonbundles.py
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 21 2020 Miro Hrončok <mhroncok@redhat.com> - 11-10
|
||||||
|
- pythondistdeps: Split Python Extras names after the rightmost plus sign
|
||||||
|
|
||||||
* Fri Jul 10 2020 Tomas Orsava <torsava@redhat.com> - 11-9
|
* Fri Jul 10 2020 Tomas Orsava <torsava@redhat.com> - 11-9
|
||||||
- pythondistdeps: Implement provides/requires for extras packages
|
- pythondistdeps: Implement provides/requires for extras packages
|
||||||
- Enable --require-extras-subpackages
|
- Enable --require-extras-subpackages
|
||||||
|
@ -205,8 +205,15 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
# Is this script being run for an extras subpackage?
|
# Is this script being run for an extras subpackage?
|
||||||
extras_subpackage = None
|
extras_subpackage = None
|
||||||
if args.package_name:
|
if args.package_name and '+' in args.package_name:
|
||||||
package_name_parts = args.package_name.partition('+')
|
# The extras names are encoded in the package names after the + sign.
|
||||||
|
# We take the part after the rightmost +, ignoring when empty,
|
||||||
|
# this allows packages like nicotine+ or c++ to work fine.
|
||||||
|
# While packages with names like +spam or foo+bar would break,
|
||||||
|
# names started with the plus sign are not very common
|
||||||
|
# and pluses in the middle can be easily replaced with dashes.
|
||||||
|
# Python extras names don't contain pluses according to PEP 508.
|
||||||
|
package_name_parts = args.package_name.rpartition('+')
|
||||||
extras_subpackage = package_name_parts[2] or None
|
extras_subpackage = package_name_parts[2] or None
|
||||||
|
|
||||||
for f in (args.files or stdin.readlines()):
|
for f in (args.files or stdin.readlines()):
|
||||||
|
Loading…
Reference in New Issue
Block a user