[Distutils] Confounded by unhelpful error message.

Robert Park rbpark at gmail.com
Thu May 3 09:13:32 CEST 2012

So, I'm using distutils to build RPMs on Fedora. I've had success with
this in the past but now I'm running into a problem and I'm not sure
how to fix it since the error message is an outright lie!

I start like this, naturally:

$ python setup.py bdist_rpm
running bdist_rpm
writing 'build/bdist.linux-x86_64/rpm/SPECS/GottenGeography.spec'
running sdist
running check
warning: sdist: standard file not found: should have one of README, README.txt

reading manifest template 'MANIFEST.in'
not writing to manually maintained manifest file 'MANIFEST'
creating GottenGeography-1.0.1
creating GottenGeography-1.0.1/data
creating GottenGeography-1.0.1/gg
creating GottenGeography-1.0.1/po
making hard links in GottenGeography-1.0.1...
hard linking README.md -> GottenGeography-1.0.1
[.... blah blah blah ....]
Creating tar archive
removing 'GottenGeography-1.0.1' (and everything under it)
copying dist/GottenGeography-1.0.1.tar.gz ->
building RPMs
rpm: build/bdist.linux-x86_64/rpm/SPECS/GottenGeography.spec: No such
file or directory
error: Failed to execute: "rpm -q --qf
%{arch}/%{name}-%{version}-%{release}.%{arch}.rpm\\n' --specfile

And it just stops right there. Note that the very second line of
output indicates that it is creating this file. Indeed:

$ ls -lh build/bdist.linux-x86_64/rpm/SPECS/GottenGeography.spec
-rw-r--r--. 1 robru robru 1.3K May  3 02:04

The file is there, with exactly the indicated path.

What is going wrong here? Google has turned up nothing, although it is
admittedly very difficult to search for since "No such file or
directory" is a very common error message and there's not a lot else
to go on here.

The only thing I can think of is that there's a distutils dependency
that I don't have installed, as this computer is a fresh install since
the last time this worked for me. But rpm and distutils are both
installed so I'm not really sure what exactly could be missing.

Help? Thanks.


More information about the Distutils-SIG mailing list