[Distutils] Problem with build_rpm

Juergen Hermann Juergen Hermann" <jh@web.de
Wed Jun 13 09:38:04 2001


I tried build_rpm today and failed, because of this:

+ cd /home/jhe/src/python/extensions/cin/build/bdist.linux-i686/rpm/BUIL=
+ cd cin-1.3
+ env 'CFLAGS=3D-O2 -m486 -fno-strength-reduce' python setup.py build
Traceback (innermost last):
  File "setup.py", line 14, in ?
    from distutils.core import setup, Extension
ImportError: No module named distutils.core
Bad exit status from /var/tmp/rpm-tmp.49462 (%build)
error: command 'rpm' failed with exit status 1     

The problem here is that "python" is Python 1.5, and setup.py has a "#! =

/usr/bin/env python2.1" bangpath, i.e. the call in the "+ env" line shou=
use "sys.executable", not a fixed "python" string.

Ciao, J=FCrgen

J=FCrgen Hermann, Developer (jhe@webde-ag.de)
WEB.DE AG, http://webde-ag.de/