Richard Oudkerk <shibt...@gmail.com> added the comment: > I'd make get_config_var('srcdir') to be None for installed systems, > because the source tree is not available there.
While playing with a version of the patch which returns None for non-source builds, I found that distutils.support._get_xxmodule_path() depends on get_config_var('srcdir') always returning a string: def _get_xxmodule_path(): srcdir = sysconfig.get_config_var('srcdir') candidates = [ os.path.join(os.path.dirname(__file__), 'xxmodule.c'), os.path.join(srcdir, 'Modules', 'xxmodule.c'), os.path.join(srcdir, '..', '..', '..', 'Modules', 'xxmodule.c'), ] for path in candidates: if os.path.exists(path): return path It is easy enough to modify _get_xxmodule_path() to check for None. But this does suggest that returning None might break some currently working 3rd party code. ---------- _______________________________________ 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