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. Ciao, Jürgen -- Jürgen Hermann, Developer (jhe@webde-ag.de) WEB.DE AG, http://webde-ag.de/
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
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.
This helps: # Python version to use PYTHONVERSION = 2.0 PYTHON = python$(PYTHONVERSION) $(PYTHON) setup.py bdist_rpm --python $(PYTHON) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
On Wed, Jun 13, 2001 at 03:36:40PM +0200, Juergen Hermann wrote:
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.
It should do this if you specify the --fix-python option. See the code in Lib/distutils/commands/bdist_rpm.py for details. --amk
participants (4)
-
Andrew Kuchling
-
Juergen Hermann
-
M.-A. Lemburg
-
Rene Liebscher