Bug 1558192 - Python bytecompilation queued after %install in /usr/lib/rpm/redhat/macros relies on %{__python} that possibly clashes with https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build
Summary: Python bytecompilation queued after %install in /usr/lib/rpm/redhat/macros re...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config
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: 1551326
TreeView+ depends on / blocked
 
Reported: 2018-03-19 19:41 UTC by Jan Pokorný [poki]
Modified: 2018-04-19 14:24 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-04-19 14:24:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1537244 0 unspecified CLOSED Avoid /usr/bin/python in RPM build 2021-02-22 00:41:40 UTC

Internal Links: 1537244

Description Jan Pokorný [poki] 2018-03-19 19:41:26 UTC
For now, the immediate impact are difficult to root-cause-analyse
warnings raised with koji/mock builds against Rawhide (F28?).  Later on,
the builds may fail completely (unless %__python -> %__python3).

Fedora change related to the build environment should not interfere
with this very environment.

# rpm -q rpm-build redhat-rpm-config
> rpm-build-4.14.1-8.fc28.x86_64
> redhat-rpm-config-105-1.fc29.noarch

Comment 1 Jan Pokorný [poki] 2018-03-19 19:57:32 UTC
> Fedora change related to the build environment should not interfere
> with this very environment.

(meant bidirectionally/mutually, indeed)

And see also [bug 1506355], might be wise to limit infuence of
environment variables etc. here as well.

Comment 2 Miro Hrončok 2018-03-19 20:01:18 UTC
We are aware of that. Workaround is to set __python to either python2 or python3 explicitly.

Comment 3 Miro Hrončok 2018-03-19 20:08:05 UTC
Added https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build#Python_bytecompilation

Do you have a specific example where this breaks the build? It shouldn't.

Comment 4 Jan Pokorný [poki] 2018-03-19 20:24:23 UTC
No breakage to report, just extrapolating the declared plan.

And that warning was just slightly annoying when I was after what
cases of plain python invocation I might have missed when fine-tuning
clufter package as it invokes some python scripts in %build,
sometimes even indirectly.

Comment 5 Miro Hrončok 2018-03-19 20:29:17 UTC
This should eventually be superseded by https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation

Comment 6 Jan Pokorný [poki] 2018-03-19 21:27:25 UTC
Thanks, I now see that I should have been following
https://fedoraproject.org/wiki/Packaging:Python_Appendix#Manual_byte_compilation
for non-standard paths in the first place, as otherwise
I am spreading Python 2 bytecode even when not desired.
(Fixed in clufter now.)

Comment 7 Miro Hrončok 2018-03-20 09:54:18 UTC
See also https://pagure.io/packaging-committee/issue/755


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