Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 219961 - "setup.py install" doesn't work without pyconfig-32.h for most cases
Summary: "setup.py install" doesn't work without pyconfig-32.h for most cases
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks: 219932
TreeView+ depends on / blocked
 
Reported: 2006-12-17 20:57 UTC by Mamoru TASAKA
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-19 18:52:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mamoru TASAKA 2006-12-17 20:57:43 UTC
Description of problem:

Some python related packages use distutils modules
in setup.py like:
------------------------------------
from distutils.core import setup

setup(......)
-------------------------------------

With python 2.5, this no longer works without pyconfig-32.h
(on i386) on install stage because with python 2.5 
distutils/sysconfig.py checks the existence of pyconfig-32.h
---------------------------------------
--- ./usr/lib/python2.4/distutils/sysconfig.py  2006-10-02 07:00:44.000000000 +0900
+++ /usr/lib/python2.5/distutils/sysconfig.py   2006-12-16 01:08:37.000000000 +0900
<snip>
@@ -357,17 +351,28 @@
 
         raise DistutilsPlatformError(my_msg)
 
+    # load the installed pyconfig.h:
+    try:
+        filename = get_config_h_filename()
+        parse_config_h(file(filename), g)
+    except IOError, msg:
+        my_msg = "invalid Python installation: unable to open %s" % filename
+        if hasattr(msg, "strerror"):
+            my_msg = my_msg + " (%s)" % msg.strerror
+
+        raise DistutilsPlatformError(my_msg)
+
     # On MacOSX we need to check the setting of the environment variable
     # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so
     # it needs to be compatible.
     # If it isn't set we set it to the configure-time value
<snip>
---------------------------------------

Version-Release number of selected component (if applicable):
python-2.5-6.fc7

How reproducible:
100%

Steps to Reproduce:
1. Try mockbuild of
http://www.ioa.s.u-tokyo.ac.jp/~mtasaka/dist/extras/development/SRPMS/driconf-0.9.1-2.tmp1.src.rpm
  
Actual results:
On FC-devel:
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.48489
+ umask 022
+ cd /builddir/build/BUILD
+ cd driconf-0.9.1
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /var/tmp/driconf-0.9.1-2.tmp1.fc7-root-mockbuild
+ /usr/bin/python setup.py install -O1 --skip-build --root
/var/tmp/driconf-0.9.1-2.fc7.tmp1-root-mockbuild --prefix=/usr
running install
error: invalid Python installation: unable to open
/usr/include/python2.5/pyconfig-32.h (No such file or directory)
error: Bad exit status from /var/tmp/rpm-tmp.48489 (%install)

Expected results:
This should succeed as FC-6.
I think pyconfig-32.h should be moved from -devel to
main package because currently the packaging on distutils module
is broken anyway.

Comment 1 Jeremy Katz 2006-12-19 18:52:04 UTC
Realistically, you should have been depending on python-devel to build already;
the fact that it previously "worked" is a side effect more than anything.  

I'd just move all of distutils to python-devel (or its own package) but there
are occasionally valid uses of distutils at runtime which don't require
python-devel to be present


Note You need to log in before you can comment on or make changes to this bug.