Bugs item #1536825, was opened at 2006-08-08 18:48 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1536825&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Distutils >Group: 3rd Party >Status: Closed Resolution: None Priority: 5 Submitted By: Parzival Herzog (walt-kelly) Assigned to: Nobody/Anonymous (nobody) Summary: distutils.sysconfig.get_config_h_filename gets useless file Initial Comment: python -v: Python 2.4.1 (#2, Aug 25 2005, 18:20:57) [GCC 4.0.1 (4.0.1-2mdk for Mandriva Linux release 2006.0)] on linux2 While attempting to install cElementTree, the setup build failed because the setup.py attempted to parse the sysconfig.h file, using the filename provided by distutils.sysconfig.get_config_h_filename(). The file retrieved was "/usr/include/python2.4/pyconfig.h", which contains the text: ---------- #define _MULTIARCH_HEADER python2.4/pyconfig.h #include <multiarch-dispatch.h> ---------- The cElementTree setup.py script then parsed this file, and attempted to configure itself as follows: -------- # determine suitable defines (based on Python's setup.py file) config_h = sysconfig.get_config_h_filename() config_h_vars = sysconfig.parse_config_h(open(config_h)) for feature_macro in ["HAVE_MEMMOVE", "HAVE_BCOPY"]: if config_h_vars.has_key(feature_macro): defines.append((feature_macro, "1")) -------- Since file with useful information is in "/usr/include/multiarch-i386-linux/python2.4/pyconfig.h", the subsequent build failed due to no HAVE_MEMMOVE or HAVE_BCOPY macro being defined. So, either 1) the cElementTree setup.py script is too clever for its own good, or is not clever enough, (tell that to F. Lundh) or 2) the sysconfig.get_config_h_filename is returning the wrong filename (i.e. a file that does not actually contain the needed configuration information), or 3) sysconfig.parse_config_h should, but does not follow the multi-arch-dispatch.h include, to get at the real sysconfig_h defines, or 4) Mandriva 2006 has messed up the Python distribution with that multi-arch-dispatch thing. I'm hoping that a solution is found rectifying either (2) or (3). ---------------------------------------------------------------------- >Comment By: Martin v. Löwis (loewis) Date: 2006-08-09 16:38 Message: Logged In: YES user_id=21627 My analysis is that it is (4). If Mandriva thinks it can change Python header files just like that and rearrange the layout of a Python installation, they also ought to fix distutils correspondingly. Before any code is added to distutils that supports this kind of installation, I'd like to see a PEP first stating the problem that is solved with that multi-arch-dispatch thing, and suggests a solution that will survive possible upcoming changes to that mechanism. Closing as a third-party bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1536825&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com