Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1936486

Summary: RFE: %python_extras_subpkg to support commas as argument separators
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-rpm-macrosAssignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, j, m.cyprian, mhroncok, pviktori, python-sig
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-07 11:49:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.