Bug 1936486 - RFE: %python_extras_subpkg to support commas as argument separators
Summary: RFE: %python_extras_subpkg to support commas as argument separators
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rpm-macros
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-08 15:00 UTC by Miro Hrončok
Modified: 2021-04-24 20:05 UTC (History)
6 users (show)

Fixed In Version: python-rpm-macros-3.9-36.fc35 python-rpm-macros-3.9-15.fc33 python-rpm-macros-3.9-36.fc34
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-07 11:49:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2021-03-08 15:00:43 UTC
Currently, if a package has many extras, I need to do:



%{pyproject_extras_subpkg cli
                          ghostwriter
                          pytz
                          dateutil
                          lark
                          numpy
                          pandas
                          pytest
                          redis
                          zoneinfo
                          django
                          -n python3-hypothesis}
...

%generate_buildrequires
%pyproject_buildrequires -x cli,ghostwriter,pytz,dateutil,lark,numpy,pandas,pytest,redis,zoneinfo,django

This is tedious. I want to be able to do:

%pyproject_buildrequires -x %{pyproject_extras_list}

Comment 1 Miro Hrončok 2021-03-09 11:09:06 UTC
This is a workaround I've managed to use in hypothesis:

    %global extras cli ghostwriter pytz dateutil lark numpy pandas pytest redis zoneinfo django
    %{pyproject_extras_subpkg -n python3-hypothesis %{extras}}
    ...
    %pyproject_buildrequires -x %(echo %{extras} | tr ' ' ',')

At the very least, we should allow passing a space-separated value to -x, to avoid the shell/tr workaround:

    %pyproject_buildrequires -x "%{extras}"

Or, allow passing comma separated values to %pyproject_extras_subpkg:

    %global extras cli,ghostwriter,pytz,dateutil,lark,numpy,pandas,pytest,redis,zoneinfo,django
    %{pyproject_extras_subpkg -n python3-hypothesis %{extras}}
    ...
    %pyproject_buildrequires -x %{extras}

Comment 2 Miro Hrončok 2021-03-29 12:48:46 UTC
(In reply to Miro Hrončok from comment #1)
> Or, allow passing comma separated values to %pyproject_extras_subpkg:
> 
>     %global extras
> cli,ghostwriter,pytz,dateutil,lark,numpy,pandas,pytest,redis,zoneinfo,django
>     %{pyproject_extras_subpkg -n python3-hypothesis %{extras}}
>     ...
>     %pyproject_buildrequires -x %{extras}

I've decided to solve the problem via this. Let's avoid remember-this-argument magic, across various macros defined in different components.

Comment 4 Fedora Update System 2021-04-07 11:49:36 UTC
FEDORA-2021-ec43c0e257 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2021-04-07 12:09:29 UTC
FEDORA-2021-e637ec13ac has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-e637ec13ac

Comment 6 Fedora Update System 2021-04-07 13:00:25 UTC
FEDORA-2021-62b08b52ef has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-62b08b52ef

Comment 7 Fedora Update System 2021-04-07 15:20:47 UTC
FEDORA-2021-62b08b52ef has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-62b08b52ef`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-62b08b52ef

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2021-04-07 18:16:21 UTC
FEDORA-2021-e637ec13ac has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-e637ec13ac`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-e637ec13ac

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2021-04-15 14:52:57 UTC
FEDORA-2021-62b08b52ef has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2021-04-24 19:45:36 UTC
FEDORA-2021-e637ec13ac has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2021-04-24 20:05:55 UTC
FEDORA-2021-e637ec13ac has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.