Skip to content
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
Closed

rpm: -ba: unknown option with setuptools #1456

ankitbhatia8993 opened this issue Aug 13, 2018 · 4 comments
Labels
documentation Needs Discussion Issues where the implementation still needs to be discussed.

Comments

@ankitbhatia8993
Copy link

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.

@pganssle pganssle added the Needs Triage Issues that need to be evaluated for severity and status. label Oct 19, 2018
@xrmx
Copy link
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 Issues that need to be evaluated for severity and status. labels Oct 28, 2018
@pganssle
Copy link
Member

Thanks for digging into this @xrmx.

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

@pganssle pganssle added Needs Discussion Issues where the implementation still needs to be discussed. documentation and removed help wanted labels Oct 28, 2018
@xrmx
Copy link
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
Copy link
Member

+1 for deprecating.

pganssle pushed a commit that referenced this issue Oct 30, 2018
Document that rpmbuild is required for bdist_rpm

Refs #1456
xrmx added a commit to xrmx/cpython that referenced this issue Dec 29, 2018
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Needs Discussion Issues where the implementation still needs to be discussed.
Projects
None yet
Development

No branches or pull requests

4 participants