Message165844
| Author |
sbt |
| Recipients |
chris.jerdonek, eric.araujo, fdrake, ned.deily, ronaldoussoren, sbt, tarek |
| Date |
2012年07月19日.15:16:26 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1342710988.56.0.0235861497841.issue15364@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> 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. |
|