[issue16326] distutils build_ext fails to set library_dirs in 2.7.2 on Linux
Andy Salnikov
report at bugs.python.org
Wed Dec 12 17:15:53 CET 2012
Andy Salnikov added the comment:
OK, I see the problem. Do you think it would help if it tested both
sys.executable and its symlynk-resolved path against sys.exec_prefix
like this:
if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")) or
os.path.realpath(sys.executable).startswith(os.path.join(sys.exec_prefix, "bin")):
# building third party extensions
self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
else:
# building python standard extensions
self.library_dirs.append('.')
Alternatively one can reverse the test. I guess that 'else:' is supposed
to apply when one builds new Python installation? Where does the
sys.executable points to in this case? Is there any other (more reliable)
way to figure out that the standard extensions are being built instead of
third-party modules?
Andy
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16326>
_______________________________________
More information about the Python-bugs-list
mailing list