[Distutils] problem with bdist_rpm --doc-files

Alexandre Fayolle Alexandre.Fayolle@logilab.fr
Tue Nov 28 13:14:01 2000


I could not find the answer in the archive (but them being non searchable
makes this difficult...). I'm trying to build a rpm package using
distutils 1.0.1 on a redahat 6.2 box (python 1.5.2). 

I have a script that should go in site-packages, a utility library called
lib (maybe not the best choice, I've told the author), and some
documentation in 3 directories (doc, dtd anx examples).

My setup.py looks like:

#!/usr/bin/env python
from distutils.core import setup

      version= "0.6.0",
      description = "generates Gantt diagrams from XML specification",
      author = "Nicolas Chauvat",
      url = "http://www.logilab.org/pygantt",
      #package_dir = {'':'.'},
      #packages = ['lib'],
      py_modules = ['pygantt','lib.HTMLRenderer','lib.Task','lib.common'],
and the setup.cfg file is:

doc_files = doc/TODO doc/index.html
	examples/project.html examples/project.dtd
packager = Alexandre Fayolle <alexandre.fayolle@logilab.fr>

Now, when I run setup.py bdist_rpm, this is what I get:

python setup.py bdist_rpm 
running bdist_rpm
creating build
creating build/bdist.linux-i686
creating build/bdist.linux-i686/rpm
creating build/bdist.linux-i686/rpm/SOURCES
creating build/bdist.linux-i686/rpm/SPECS
creating build/bdist.linux-i686/rpm/BUILD
creating build/bdist.linux-i686/rpm/RPMS
creating build/bdist.linux-i686/rpm/SRPMS
writing 'build/bdist.linux-i686/rpm/SPECS/pygantt.spec'
running sdist
warning: sdist: manifest template 'MANIFEST.in' does not exist (using
default fi
le list)
warning: sdist: standard file not found: should have one of README,
writing manifest file 'MANIFEST'
creating pygantt-0.6.0
creating pygantt-0.6.0/lib
making hard links in pygantt-0.6.0...
hard linking pygantt.py -> pygantt-0.6.0
hard linking setup.cfg -> pygantt-0.6.0
hard linking setup.py -> pygantt-0.6.0
hard linking lib/HTMLRenderer.py -> pygantt-0.6.0/lib
hard linking lib/Task.py -> pygantt-0.6.0/lib
hard linking lib/__init__.py -> pygantt-0.6.0/lib
hard linking lib/common.py -> pygantt-0.6.0/lib
creating dist
tar -cf dist/pygantt-0.6.0.tar pygantt-0.6.0
gzip -f9 dist/pygantt-0.6.0.tar
removing 'pygantt-0.6.0' (and everything under it)
copying dist/pygantt-0.6.0.tar.gz -> build/bdist.linux-i686/rpm/SOURCES
building RPMs

<I'll skip the things that go without problem>

Processing files: pygantt-0.6.0-1
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.33791
+ umask 022
+ cd /home/alf/pygantt/build/bdist.linux-i686/rpm/BUILD
+ cd pygantt-0.6.0
+ DOCDIR=/var/tmp/pygantt-buildroot/usr/doc/pygantt-0.6.0
+ export DOCDIR
+ rm -rf /var/tmp/pygantt-buildroot/usr/doc/pygantt-0.6.0
+ /bin/mkdir -p /var/tmp/pygantt-buildroot/usr/doc/pygantt-0.6.0
+ cp -pr doc/TODO doc/index.html dtd/project.dtd examples/project.html
project.dtd /var/tmp/pygantt-buildroot/usr/doc/pygantt-0.6.0
cp: doc/TODO: No such file or directory
cp: doc/index.html: No such file or directory
cp: dtd/project.dtd: No such file or directory
cp: examples/project.html: No such file or directory
cp: examples/project.dtd: No such file or directory
Bad exit status from /var/tmp/rpm-tmp.33791 (%doc)

<snip the end of the output>

What am I missing? Is it forbidden to put subdirectories in --doc-files? 

Thanks for your support.

Alexandre Fayolle
Narval is the first software agent available as free software (GPL).
LOGILAB, Paris (France).