classification
Title: distutils.sysconfig is not cross-platform compatible
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.2, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: tarek Nosy List: christian.heimes, eric.araujo, loewis, tarek, weegreenblobbie
Priority: low Keywords:

Created on 2007-10-18 17:16 by weegreenblobbie, last changed 2010-09-07 14:47 by eric.araujo.

Messages (5)
msg56533 - (view) Author: Nick (weegreenblobbie) Date: 2007-10-18 17:16
I'm using scons (www.scons.org) and Python's distutils.sysconfig to
determine the correct compiler flags automatically to embed Python into
my C++ application.  I discovered that distuils.sysconfig is not fully
implemented on Windows.  Using distutils.sysconfg.get_config_var() or
get_config_vars() does not work on the Windows distribution.

The above calls will return values for INCLUDEPY LIBDIR LIB on Ubuntu
Linux, however, on Windows, these variables are not all declared.

These variables should be declared on all platforms so one can
automatically get the correct compiler flags needed to embed python in
one's C/C++ project.
msg56541 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-10-18 19:47
Would you like to work on a patch?
msg56555 - (view) Author: Nick (weegreenblobbie) Date: 2007-10-19 14:52
I'll look into it this weekend.
msg59779 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-01-12 03:15
It's going to be hard to implement the feature for Windows. The
PC/pyconfig.h uses lots of #ifdef and #if defined. If you are still
interested in the matter please provide a patch and answer within two weeks.

Otherwise this bug will be closed on 2008-01-26.
msg115766 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-09-07 14:46
Is this still relevant for the new sysconfig module? Tests would be a valuable addition.
History
Date User Action Args
2010-09-07 14:47:07eric.araujosetversions: - Python 3.1
2010-09-07 14:46:50eric.araujosetversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
nosy: + eric.araujo

messages: + msg115766

components: + Library (Lib), - Build, Distutils
type: compile error -> behavior
2009-02-11 04:24:17ajaksu2setassignee: tarek
components: + Distutils, - Windows
nosy: + tarek
2008-01-12 03:15:55christian.heimessetpriority: low
nosy: + christian.heimes
messages: + msg59779
components: + Windows
versions: + Python 2.6, - Python 2.5
2007-10-19 14:52:58weegreenblobbiesetmessages: + msg56555
2007-10-18 19:47:58loewissetnosy: + loewis
messages: + msg56541
2007-10-18 17:16:50weegreenblobbiecreate