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: sysconfig and alternative implementations
Type: behavior Stage: resolved
Components: Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, amaury.forgeotdarc, eric.araujo, francismb, iritkatriel, michael.foord, tarek
Priority: normal Keywords:

Created on 2010-12-23 17:56 by michael.foord, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (8)
msg124560 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2010-12-23 17:56
sysconfig assumes there will be a makefile if the platform is posix, which isn't always true. For example IronPython on Mac OS X with mono.

This leads to a traceback on startup with IronPython 2.7:

$ ipy27
Traceback (most recent call last):
  File "/Second/michael/Downloads/IronPython-2.7/Lib/site.py", line 548, in <module>
  File "/Second/michael/Downloads/IronPython-2.7/Lib/site.py", line 530, in main
  File "/Second/michael/Downloads/IronPython-2.7/Lib/site.py", line 264, in addusersitepackages
  File "/Second/michael/Downloads/IronPython-2.7/Lib/site.py", line 239, in getusersitepackages
  File "/Second/michael/Downloads/IronPython-2.7/Lib/site.py", line 229, in getuserbase
  File "/Second/michael/Downloads/IronPython-2.7/Lib/sysconfig.py", line 518, in get_config_var
  File "/Second/michael/Downloads/IronPython-2.7/Lib/sysconfig.py", line 421, in get_config_vars
  File "/Second/michael/Downloads/IronPython-2.7/Lib/sysconfig.py", line 275, in _init_posix
IOError: invalid Python installation: unable to open /Volumes/Second Drive/michael/Downloads/IronPython-2.7/lib/python2.7/config/Makefile (Could not find a part of the path "/Volumes/Second Drive/michael/Downloads/IronPython-2.7/lib/python2.7/config/Makefile".)IronPython 2.7 Beta 1 (2.7.0.10) on .NET 4.0.30319.1
Type "help", "copyright", "credits" or "license" for more information.
>>>
msg124691 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-12-27 01:46
PyPy has exactly the same issue. PyPy's workaround is to have a custom version of sysconfig.py, but this is really a hack.
If these config_vars are really determined at compile time, IMO they should be built in the interpreter (in a _sysconfig module?). This would even work on non-posix platforms.
msg124719 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2010-12-27 17:43
Yes that's what we said we would do, and was the second step after the extraction of sysconfig from distutils.
msg124807 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-28 17:36
I suggest this bug is superseded by #9878.
msg124810 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-12-28 17:55
Indeed
msg124811 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2010-12-28 17:58
No, issue 9878 can't be implemented for Python 2.7 whereas the issues other implementations have with sysconfig *could* still be resolved in 2.7 as a bugfix. (Specifically for IronPython on Mac OS X it would mean not assuming that being on a posix platform means there is a Makefile.)
msg228458 - (view) Author: Francis MB (francismb) * Date: 2014-10-04 13:35
Is this issue superseded and duplicated as stated in the history?

Thanks in advance!
msg391958 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-04-26 17:50
This was fixed in python 3 (see issue9878) and it's too late for 2.7.
History
Date User Action Args
2022-04-11 14:57:10adminsetgithub: 54973
2021-04-26 17:50:03iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg391958

resolution: out of date
stage: resolved
2014-10-04 13:35:06francismbsettype: behavior

messages: + msg228458
nosy: + francismb
2011-02-24 00:45:10eric.araujosetresolution: duplicate -> (no value)
superseder: Avoid parsing pyconfig.h and Makefile by autogenerating extension module ->
nosy: amaury.forgeotdarc, tarek, eric.araujo, Arfrever, michael.foord
2010-12-28 17:58:15michael.foordsetstatus: closed -> open
nosy: amaury.forgeotdarc, tarek, eric.araujo, Arfrever, michael.foord
messages: + msg124811
2010-12-28 17:55:44amaury.forgeotdarcsetstatus: open -> closed
superseder: Avoid parsing pyconfig.h and Makefile by autogenerating extension module
messages: + msg124810

nosy: amaury.forgeotdarc, tarek, eric.araujo, Arfrever, michael.foord
resolution: duplicate
2010-12-28 17:36:01eric.araujosetnosy: amaury.forgeotdarc, tarek, eric.araujo, Arfrever, michael.foord
messages: + msg124807
2010-12-27 17:43:33tareksetnosy: amaury.forgeotdarc, tarek, eric.araujo, Arfrever, michael.foord
messages: + msg124719
2010-12-27 17:33:11Arfreversetnosy: + Arfrever
2010-12-27 01:46:25amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg124691
2010-12-23 17:56:22michael.foordcreate