This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bdist_rpm SPEC files created with distutils may be distro specific
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.5
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: docs@python Nosy List: BreamoreBoy, bkabrda, dmalcolm, docs@python, eric.araujo, ncoghlan
Priority: normal Keywords:

Created on 2012-10-15 02:24 by ncoghlan, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg172938 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2012-10-15 02:24
In resolving 14443 we effectively embedded the vendor macros in the SPEC file generated by bdist_rpm on older versions of RHEL (and derivatives).

While I think that's a necessary evil (in order to create Python 3 RPMs that actually work properly at all on those platforms), we should note the distro limitation somewhere in the documentation: even if the RPM would otherwise work properly on Fedora *and* RHEL (and perhaps even openSUSE), the embedded copy of the vendor post install macros may misfire.
msg223115 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-15 15:09
Who is best placed to produce a patch for this?
msg223166 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-07-16 02:15
Actually, with RHEL and CentOS 7 out the door, I believe we could potentially just rip the whole mess out of the upstream project.

Slavek, this is about a hack Dave and I put into bdist_rpm to get Python 3 packages building correctly on RHEL 6. I believe the underlying issue with not specifying the interpreter version has been fixed for 7,so can we just get rid of the workaround now? Or at least double check the non-portability issue only affects 6 and close this as wontfix?
msg223178 - (view) Author: Bohuslav "Slavek" Kabrda (bkabrda) * Date: 2014-07-16 07:09
Hi, so I'm not sure I understand this correctly. AFAICS there are two patches in issue 14443 that are, to certain degree, independent. As for the patch that overrides __os_install_post [1], that is no longer needed in RHEL 7, since the line

    /usr/lib/rpm/brp-python-bytecompile \

in RHEL 6 RPM has been replaced by

    /usr/lib/rpm/brp-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build} \

in RHEL 7 RPM. The other patch referenced from that issue that defines macro __python to self.python (meaning either sys.executable or "python3") [2] is still needed, I believe.

I hope that this answers the question.

[1] http://hg.python.org/cpython/rev/a9a12ad553f0
[2] http://hg.python.org/cpython/rev/3d61e27cc570
msg223188 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-07-16 11:17
Thanks Slavek. That means this bug doesn't affect RHEL 7 or CentOS 7, and if it affects the Python 3 software collections on RHEL/CentOS 6, we can potentially deal with it on the collection side of things.

Accordingly, closing this as a problem for downstream to deal with.

Thanks for the prompt, Mark.
History
Date User Action Args
2022-04-11 14:57:37adminsetgithub: 60441
2014-07-16 11:17:44ncoghlansetstatus: open -> closed
resolution: wont fix
messages: + msg223188

stage: needs patch -> resolved
2014-07-16 07:09:53bkabrdasetmessages: + msg223178
2014-07-16 02:15:26ncoghlansetnosy: + bkabrda
messages: + msg223166
2014-07-15 15:09:41BreamoreBoysetnosy: + BreamoreBoy

messages: + msg223115
versions: + Python 3.5, - Python 3.2, Python 3.3
2012-10-19 16:24:24eric.araujosetnosy: + eric.araujo
2012-10-15 02:24:31ncoghlancreate