Message177379
| Author |
Andy.Salnikov |
| Recipients |
Andy.Salnikov, eric.araujo, tarek, vinay.sajip |
| Date |
2012年12月12日.16:15:53 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1355328953.76.0.402975763886.issue16326@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年12月12日 16:15:53 | Andy.Salnikov | set | recipients:
+ Andy.Salnikov, vinay.sajip, tarek, eric.araujo |
| 2012年12月12日 16:15:53 | Andy.Salnikov | set | messageid: <1355328953.76.0.402975763886.issue16326@psf.upfronthosting.co.za> |
| 2012年12月12日 16:15:53 | Andy.Salnikov | link | issue16326 messages |
| 2012年12月12日 16:15:53 | Andy.Salnikov | create |
|