Bug 1812087 - Local overriding of %{python3_pkgversion} confuses %python_provide
Summary: Local overriding of %{python3_pkgversion} confuses %python_provide
Keywords:
Status: CLOSED RAWHIDE
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: 1821489
TreeView+ depends on / blocked
 
Reported: 2020-03-10 14:01 UTC by Miro Hrončok
Modified: 2020-04-06 23:08 UTC (History)
6 users (show)

Fixed In Version: python-rpm-macros-3.8-1.fc33
Clone Of:
Environment:
Last Closed: 2020-03-25 17:28:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-03-10 14:01:14 UTC
When I attempted to build python39-setuptools to test what would be needed in order to have multiple Python 3 stacks in future RHEL, I have noticed the following problem:

python39-setuptools provides:

  python-setuptools = 45.2.0-1.fc33


The build was done by setting the following in spec:

  %global python3_pkgversion 39
  %global __python3 %{_bindir}/python3.9

And indeed the %python_provide macro respects %python3_pkgversion on Fedora in this way:

  $ rpm --define 'python3_pkgversion 39' --eval '%python_provide python%{python3_pkgversion}-setuptools'
  
  Provides: python-setuptools = %{version}-%{release}
  Obsoletes: python-setuptools < %{version}-%{release}

I think we should not use %{python3_pkgversion} in the %python_provide macro to allow resetting %{python3_pkgversion} to a custom value without changing how %python_provide behaves.


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