Bug 201434 - distutils.sysconfig.{get_config_h_filename,parse_config_h} broken
distutils.sysconfig.{get_config_h_filename,parse_config_h} broken
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: python (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mihai Ibanescu
Brock Organ
:
Depends On: 139911
Blocks: FC6Blocker 201435 203090 208707
  Show dependency treegraph
 
Reported: 2006-08-05 05:33 EDT by Axel Thimm
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.4.3-15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-17 18:18:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Axel Thimm 2006-08-05 05:33:41 EDT
Description of problem:
/usr/include/python2.4/pyconfig.h is now a wrapper for 32/64 bit sub-includes.
This breaks the usual query mechanism for extracting python build flags.

Version-Release number of selected component (if applicable):
python-2.4.3-14.fc6

How reproducible:
always

Steps to Reproduce:
1.config_h = sysconfig.get_config_h_filename()
2.config_h_vars = sysconfig.parse_config_h(open(config_h))
3.
  
Actual results:
{}

Expected results:
{'STRICT_SYSV_CURSES': "/* Don't use ncurses extensions */", 'HAVE_SELECT': 1,
'HAVE_ST_BLOCKS': 1, [...]

Additional info:
o Breaks builds of smart package on FC6
o One can argue that the bug is in the implementation of parse_config_h, which
  should be able to descend into further included files. OTOH it would then need
  to understand nested conditionals, too.
o maybe the 32/64 bits switch should be performed already on 
  get_config_h_filename level? E.g. get_config_h_filename should return
  pyconfig-32.h and pyconfig-64.h respectively?

Thanks!
Comment 1 Axel Thimm 2006-08-05 06:07:33 EDT
Turns out this is due to the fix for multilib -devel support in bug #139911
comment 2. This fix only considered C/C++ consumers of pyconfig.h. python's
querying mechanism needs to be redirected, too, by patching
get_config_h_filename. A simple untested specfile fix is in bug #139911 comment 4.
Comment 2 Mihai Ibanescu 2006-08-17 18:18:16 EDT
Fix (based on your suggestion) included in python-2.4.3-15 - thanks!
Comment 3 Axel Thimm 2006-08-18 18:54:25 EDT
This fixes bug #201435, thanks!
Wrt to organisation, I'll just go ahead and close #201435 w/o removing the
dependency, I hope that's the proper procedure. Otherwise feel free to remove
the dependency. Thanks, again!

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