[Distutils] Appears bdist_rpm completely broken

Uche Ogbuji uche.ogbuji@fourthought.com
Wed Sep 20 14:06:02 2000

Maybe I'm missing something, but I don't see how bdist_rpm works for
anyone.  I've tried 0.9.2, the 9/12 and 9/16 snapshots but I have a
problem with the generated pycs.

First the symptom.  I build 4Suite using distutils.  The sdist, bdist
and bdist_win packages work just fine, but when I move the generated RPM
to another machine and try to use 4Suite:

[uogbuji@dynip-23 uogbuji]$ python
Python 1.5.2 (#1, Jul 12 2000, 10:39:14)  [GCC 2.96 20000702
(experimental)] on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import sys
>>> sys.path
['', '/usr/lib/python1.5/', '/usr/lib/python1.5/plat-linux-i386',
'/usr/lib/python1.5/lib-tk', '/usr/lib/python1.5/lib-dynload',
>>> import xml.xslt
Traceback (innermost last):
  File "<stdin>", line 1, in ?
line 3, in ?
line 3, in ?
ImportError: cannot import name XPathParserBase

The problem is the phantom

[uogbuji@dynip-23 uogbuji]$ ls /var/tmp
[uogbuji@dynip-23 uogbuji]$ 

Further investigation turns up the culprit:  The generated pyc files
from the RPM have the "/var/tmp/..." hard-coded in to their imports.

So am I doing something wrong, or is distutils broken for RPM build?

I'm not on the distutils list so ccs to me would be appreciated. 
Otherwise I can check the archives.


Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python