Bug 1812087

Summary: Local overriding of %{python3_pkgversion} confuses %python_provide
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-rpm-macrosAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, j, m.cyprian, mhroncok, orion, python-sig
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-rpm-macros-3.8-1.fc33 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-25 17:28:17 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:
Bug Depends On:    
Bug Blocks: 1821489    

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.