Ned Deily <n...@acm.org> added the comment:

That does seem to be a regression since distutils.sysconfig works correctly in 
a virtualenv:

$ python3.2 -c 'import 
distutils.sysconfig;print(distutils.sysconfig.get_makefile_filename())'
/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config-3.2m/Makefile
$ python3.2 -c 'import sysconfig;print(sysconfig.get_makefile_filename())'
/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config-3.2m/Makefile

but in a virtualenv:

$ source t/bin/activate
$ python3.2 -c 'import 
distutils.sysconfig;print(distutils.sysconfig.get_makefile_filename())'
/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config-3.2m/Makefile
$ python3.2 -c 'import sysconfig;print(sysconfig.get_makefile_filename())'
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/sysconfig.py", 
line 332, in _init_posix
    _parse_makefile(makefile, vars)
  File 
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/sysconfig.py", 
line 220, in _parse_makefile
    with open(filename, errors="surrogateescape") as f:
IOError: [Errno 2] No such file or directory: 
'/Users/nad/t/lib/python3.2/config-3.2m/Makefile'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File 
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/sysconfig.py", 
line 322, in get_makefile_filename
    return os.path.join(get_path('stdlib'),
  File 
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/sysconfig.py", 
line 451, in get_path
    return get_paths(scheme, vars, expand)[name]
  File 
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/sysconfig.py", 
line 442, in get_paths
    return _expand_vars(scheme, vars)
  File 
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/sysconfig.py", 
line 168, in _expand_vars
    _extend_dict(vars, get_config_vars())
  File 
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/sysconfig.py", 
line 487, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File 
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/sysconfig.py", 
line 337, in _init_posix
    raise IOError(msg)


BTW, your example will fail in any case since get_paths takes a scheme name; 
"purelib" is a path name.

----------
nosy: +barry, ned.deily

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10743>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to