You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bdist_rpm fails if no rpm command and rpmbuild is not in /usr/bin or /bin #76462
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2018-11-18.19:25:44.140>created_at=<Date2017-12-11.23:26:49.741>labels= ['easy', '3.8', 'type-feature', 'library']
title='bdist_rpm fails if no rpm command and rpmbuild is not in /usr/bin or /bin'updated_at=<Date2018-11-18.19:25:44.139>user='https://github.com/bhyde'
Rather than searching a few hard-coded paths, I would think this would be a good case for using distutils.spawn find_executable like test_bdist_rpm.py does :) If someone (@bhyde) were willing to create a PR with that change, this issue will have a much better chance of being resolved.
Thanks, @n0npax, for producing a PR implementing what I suggested. It looks good. However, while testing it, I ran across earlier open bpo-11122 in which the same issue of building rpms on macOS is brought up. (Sorry I didn't see this earlier!) The solution proposed there is to just unconditionally use rpmbuild as the use of rpm was for now obsolete versions. I don't really have any experience with rpmbuild or stake in making the change. But, rather than applying PR 10589, it looks like following through on bpo-11122 would be the better approach. Therefore, I'm going to close this issue (and PR) as a duplicate and suggest we move the discussion and perhaps generate a new PR there.
Activity
bhyde commentedon Dec 11, 2017
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:
cpython/Lib/distutils/command/bdist_rpm.py
Line 313 in 6f0eb93
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:
And now I can use build_rpm on my mac, oh joy.
bhyde commentedon Nov 7, 2018
ping
ned-deily commentedon Nov 9, 2018
Rather than searching a few hard-coded paths, I would think this would be a good case for using distutils.spawn find_executable like test_bdist_rpm.py does :) If someone (@bhyde) were willing to create a PR with that change, this issue will have a much better chance of being resolved.
[-]bdist_rpm v.s. the Macintosh[/-][+]bdist_rpm fails if no rpm command and rpmbuild is not in /usr/bin or /bin[/+]ned-deily commentedon Nov 18, 2018
Thanks, @n0npax, for producing a PR implementing what I suggested. It looks good. However, while testing it, I ran across earlier open bpo-11122 in which the same issue of building rpms on macOS is brought up. (Sorry I didn't see this earlier!) The solution proposed there is to just unconditionally use rpmbuild as the use of rpm was for now obsolete versions. I don't really have any experience with rpmbuild or stake in making the change. But, rather than applying PR 10589, it looks like following through on bpo-11122 would be the better approach. Therefore, I'm going to close this issue (and PR) as a duplicate and suggest we move the discussion and perhaps generate a new PR there.