New submission from Ben Hyde :
With the fix below is becomes possible to build rpms on the Mac.
The developer will need to install rpm tooling. That's easy via "brew install
rpm".
That, for example, installs /usr/local/bin/rpmbuild.
Sadly bdist_rpm.py only supports rpmbuild in two places, see:
https://github.com/python/cpython/blob/6f0eb93183519024cb360162bdd81b9faec97ba6/Lib/distutils/command/bdist_rpm.py#L313
Which due to the Mac's fastidious security setup we are very strongly
discouraged from working around.
So, yeah, let's add a third, like so maybe:
if ((os.path.exists('/usr/bin/rpmbuild')
or os.path.exists('/bin/rpmbuild')
or os.path.exists('/usr/local/bin/rpmbuild'))):
rpm_cmd = ['rpmbuild']
And now I can use build_rpm on my mac, oh joy.
--
components: Distutils
messages: 308080
nosy: bhyde, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: bdist_rpm v.s. the Macintosh
type: enhancement
versions: Python 2.7
___
Python tracker
<https://bugs.python.org/issue32281>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com