Bug 219961 - "setup.py install" doesn't work without pyconfig-32.h for most cases
"setup.py install" doesn't work without pyconfig-32.h for most cases
Product: Fedora
Classification: Fedora
Component: python (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Brock Organ
Depends On:
Blocks: 219932
  Show dependency treegraph
Reported: 2006-12-17 15:57 EST by Mamoru TASAKA
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-12-19 13:52:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mamoru TASAKA 2006-12-17 15:57:43 EST
Description of problem:

Some python related packages use distutils modules
in setup.py like:
from distutils.core import 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
@@ -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

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Try mockbuild of
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
+ 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 13:52:04 EST
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.