New submission from Richard Oudkerk <shibt...@gmail.com>: With unix, and a source build, sysconfig.get_config_var('srcdir') and sysconfig.get_path('include') misbehave:
user@mint-vm ~/Repos/cpython $ cd / user@mint-vm / $ ~/Repos/cpython/python Python 3.3.0b1 (default:671894ae19a2, Jul 16 2012, 10:43:27) [GCC 4.5.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sysconfig >>> sysconfig.get_config_var('srcdir') '/' >>> sysconfig.get_path('include') '//Include' The problem seems to be the else clause of if 'srcdir' not in _CONFIG_VARS: _CONFIG_VARS['srcdir'] = _PROJECT_BASE else: _CONFIG_VARS['srcdir'] = _safe_realpath(_CONFIG_VARS['srcdir']) The else clause (in slightly modified form) was introduced in 356d0ea8ea34, and it turns a relative path into an absolute path, using the current working directory as a base. For me, simply removing the line allows the absolute path to be calculated correctly a few lines later on. I don't know what problem 356d0ea8ea34 was intended to fix. ---------- messages: 165581 nosy: sbt priority: normal severity: normal stage: needs patch status: open title: sysconfig confused by relative paths type: behavior _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15364> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com