[New-bugs-announce] [issue32281] bdist_rpm v.s. the Macintosh

Ben Hyde report at bugs.python.org
Mon Dec 11 18:26:49 EST 2017


New submission from Ben Hyde <bhyde at pobox.com>:

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 <report at bugs.python.org>
<https://bugs.python.org/issue32281>
_______________________________________


More information about the New-bugs-announce mailing list