Bug 1868346

Summary: Adapt README of pyproject-rpm-macros
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: pyproject-rpm-macrosAssignee: Python Maintainers <python-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mhroncok, pviktori, python-sig, sanjay.ankur
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-20 10:23:00 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 2020-08-12 11:11:59 UTC
We should document that:


You should BR the Python you want (python3-devel).


%pyproject_wheel/_install/%tox is not fully supported without %pyproject_buildrequires.


The macros don't need pyproject.toml present (currently it starts with "These macros are useful for packaging Python projects that use the PEP 517 pyproject.toml file").

Comment 1 Miro Hrončok 2020-08-14 12:23:54 UTC
Another thing to add:

FranciscoD: ...Sometimes the dep generation fails but doesn't kill the mock build---is that expected behaviour?
... shows logs ...

mhroncok: FranciscoD: for all %generate_buildrequires, it ends with "an error" (exit 11)
mhroncok: FranciscoD: that is rpm and/or mock behavior
mhroncok: FranciscoD: mock interprets it as: go and install this stuff
mhroncok: FranciscoD: once there is no more packages to install, mock proceeds with %build

FranciscoD: OK, I guess that makes sense. Could this be documented somewhere please?

mhroncok: FranciscoD: I can try, but where would you expect it to be documented?

FranciscoD: I guess at the moment the https://src.fedoraproject.org/rpms/pyproject-rpm-macros readme is the only place
FranciscoD: i expect it'll make it to the python packaging guidelines in the future

mhroncok: FranciscoD: well, it is a general behavior of %generate_buildrequires
mhroncok: FranciscoD: https://fedoraproject.org/wiki/Changes/DynamicBuildRequires

FranciscoD: https://fedoraproject.org/wiki/Changes/DynamicBuildRequires explains it, thanks. I didn't remember that error 11 is "OK, proceed".
FranciscoD: mhroncok: maybe a link to the change proposal in the pyproject-rpm-macros readme saying "For more information on DynamicBuildRequires, see the change proposal: ..."?
FranciscoD: just so that others like me who may have missed it are directed to it, and don't have to ping you to direct us XD

Comment 2 Petr Viktorin (pviktori) 2020-08-20 09:56:08 UTC
PR: https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/85