[Distutils] Problem with build_rpm
Rene Liebscher
R.Liebscher@gmx.de
Wed Jun 13 09:54:02 2001
Juergen Hermann wrote:
>
> Hi!
>
> I tried build_rpm today and failed, because of this:
>
> + cd /home/jhe/src/python/extensions/cin/build/bdist.linux-i686/rpm/BUILD
> + cd cin-1.3
> + env 'CFLAGS=-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 should
> use "sys.executable", not a fixed "python" string.
The bangpath is ignored when you write "python setup.py ...".
Distutils is included in python 1.6 or later.
For python 1.5 you can download it at
http://www.python.org/sigs/distutils-sig/download.html
Kind regards
Rene Liebscher