New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpm: -ba: unknown option with setuptools #1456

Closed
ankitbhatia8993 opened this Issue Aug 13, 2018 · 4 comments

Comments

4 participants
@ankitbhatia8993

ankitbhatia8993 commented Aug 13, 2018

Running below command in venv(Python-3.6)

python setup.py bdist_rpm

Error logs:

copying dist/abc-api-0.0.1.tar.gz -> build/bdist.macosx-10.6-intel/rpm/SOURCES
building RPMs
rpm -ba --define __python python3 --define _topdir abc-api/build/bdist.macosx-10.6-intel/rpm --clean build/bdist.macosx-10.6-intel/rpm/SPECS/abc-api.spec
rpm: -ba: unknown option
error: command 'rpm' failed with exit status 1

Versions:

Python 3.6.4
RPM version 4.14.1
setuptools-40.0.0

This is working for zip packaging but not for RPM. Please check.

Thanks in advance.

@xrmx

This comment has been minimized.

Contributor

xrmx commented Oct 28, 2018

I confirm that on my machine a recent rpm version (4.14.2) does not have the -b switch anymore. It looks nowadays rpm packages are built with rpmbuild which is already supported by python distutils. So installing rpmbuild should make bidst_rpm work.

xrmx added a commit to xrmx/setuptools that referenced this issue Oct 28, 2018

xrmx added a commit to xrmx/setuptools that referenced this issue Oct 28, 2018

@pganssle pganssle added help wanted and removed Needs Triage labels Oct 28, 2018

@pganssle

This comment has been minimized.

Member

pganssle commented Oct 28, 2018

Thanks for digging into this @xrmx.

@jaraco @benoit-pierre Should we deprecate bdist_rpm? It seems to be broken without the rpmbuild package.

@xrmx

This comment has been minimized.

Contributor

xrmx commented Oct 28, 2018

On debian and brew the rpmbuild command is inside the rpm package, on fedora AFAICT is in a separate package rpm-build. Problem with brew on MacOS is that it gets installed in /usr/local/bin which is not a path searched by CPython distutils code for rpmbuild.

@benoit-pierre

This comment has been minimized.

Member

benoit-pierre commented Oct 28, 2018

+1 for deprecating.

xrmx added a commit to xrmx/cpython that referenced this issue Oct 29, 2018

Search rpmbuild in more paths
So there's more chances that is found. At least on MacOS when
installed with brew. This is the minimal fix i can find to help
with: pypa/setuptools#1456.

PyPA Sprint Weekend at Bloomberg (2018) automation moved this from In progress to Closed Issues Oct 30, 2018

pganssle added a commit that referenced this issue Oct 30, 2018

Document that rpmbuild is required for bdist_rpm (#1547)
Document that rpmbuild is required for bdist_rpm

Refs #1456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment