Bug 1821492

Summary: %pyproject macros only work with the "main" Python version
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: pyproject-rpm-macrosAssignee: Lumír Balhar <lbalhar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: j, lbalhar, mhroncok, pviktori, python-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-19 12:06:51 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-04-06 23:26:35 UTC
When %__python3 is redefined to something different than /usr/bin/python3, %pyproject macros will fail to function. Several problems:

 1) %pyproject_buildrequires will run on %__python3 but it will produce python3dist() buildrequires (see bz1821486 for problems with that) and will BR python3-devel

 2) the macro package runtime depends on hardcoded list of python3 packages (from the main stack), when Fedora 30 goes EOL we should only support using the dynamic buildrequires once (1) is fixed (or we should only preserve the manual requires on Fedora 30)

 3) %tox will try to invoke /usr/bin/tox, but `tox --current-env` can only work if it runs tox via `%{__python3} -m tox`


Most likely other issues, this is not a full analysis.

Comment 1 Lumír Balhar 2020-07-21 10:27:02 UTC
I am trying to build an alternative Python stack (3.8) on Fedora rawhide in COPR (https://copr.fedorainfracloud.org/coprs/lbalhar/alternative_stack/) and fix all problems along the way.

There is currently nothing more on top of the points mentioned in the first comment.

Comment 2 Lumír Balhar 2020-07-21 13:25:27 UTC
Fixes for all three points above and one more: https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/65

Comment 3 Ben Cotton 2020-08-11 13:16:46 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.