Bug 1355810 - %python_provide macro breaks fedpkg
Summary: %python_provide macro breaks fedpkg
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-rpm-macros
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1341641
TreeView+ depends on / blocked
 
Reported: 2016-07-12 15:03 UTC by Matěj Cepl
Modified: 2018-04-11 11:44 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-12 15:42:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
example spec file (2.30 KB, text/plain)
2016-07-12 15:03 UTC, Matěj Cepl
no flags Details

Description Matěj Cepl 2016-07-12 15:03:06 UTC
Created attachment 1178939 [details]
example spec file

Description of problem:

When I include the following line (and the equivalent for python3) to my spec, fedpkg breaks

%{?python_provide:%python_provide python2-%{modname}}                           

with

    $ fedpkg --dist master --module-name pytest-runner srpm
    error: line 42: Unknown tag: %python_provide: ERROR: python3-pytest_runner not recognized.
    error: query of specfile /home/matej/build/EXTRAS/pytest-runner/pytest-runner.spec failed, can't parse

    Could not execute srpm: Could not get n-v-r-e from '\n'
    $

Version-Release number of selected component (if applicable):
python-srpm-macros-3-6.el7.1.noarch
python-rpm-macros-3-6.el7.1.noarch

How reproducible:
100%

Steps to Reproduce:
1. see above
2.
3.

Actual results:
my Python packaging is completely broken,

Expected results:


Additional info:
This bug completely disallows me to do packaging work on RHEL-7. Of
course, I am aware that I am also forbidden to use one spec for all
branches (because now every packages asks for python2-foo instead of
python-foo, so all my current python packages are broken), but this one
completely shuts me down.

Comment 1 Orion Poplawski 2016-07-12 15:42:51 UTC
Instead of:

%{?python_provide:%python_provide python3-%{modname}}

use:

%{?python_provide:%python_provide python%{python3-pkgversion}-%{modname}}                      

python3- is not valid on EL7.

Comment 2 Sergio Basto 2017-02-14 04:44:45 UTC
is not %{python3-pkgversion} is %{python3_pkgversion}

documented here: 
https://fedoraproject.org/wiki/PackagingDrafts:Python3EPEL

%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}


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