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.

Author bhyde
Recipients bhyde, dstufft, eric.araujo
Date 2017-12-11.23:26:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513034809.77.0.213398074469.issue32281@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-12-11 23:26:49bhydesetrecipients: + bhyde, eric.araujo, dstufft
2017-12-11 23:26:49bhydesetmessageid: <1513034809.77.0.213398074469.issue32281@psf.upfronthosting.co.za>
2017-12-11 23:26:49bhydelinkissue32281 messages
2017-12-11 23:26:49bhydecreate