This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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

Created on 2007-10-18 17:16 by weegreenblobbie, last changed 2022-04-11 14:56 by admin.

Messages (6)
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.
msg221253 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-22 13:44
From https://docs.python.org/3/library/distutils.html "Most Python users will not want to use this module directly, but instead use the cross-version tools maintained by the Python Packaging Authority. Refer to the Python Packaging User Guide for more information.".  So can this be closed as out of date?
History
Date User Action Args
2022-04-11 14:56:27adminsetgithub: 45640
2014-06-22 13:44:56BreamoreBoysetnosy: + BreamoreBoy
messages: + msg221253
2013-11-17 15:27:09christian.heimessetstatus: open -> languishing
assignee: tarek ->
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