From: Tarek Ziadé Date: Sat, 6 Mar 2010 01:23:21 +0000 (+0000) Subject: simplified the fallback case X-Git-Tag: v2.7a4~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e48ff8e50a041e3f227ff096c0e31340864ab6c;p=python simplified the fallback case --- diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index 5dea4dde7b..867ba96ec4 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -19,11 +19,10 @@ ALREADY_TESTED = False def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') - xxmodule = os.path.join(srcdir, 'Modules', 'xxmodule.c') - if not os.path.exists(xxmodule): + if srcdir is None: # local fallback - xxmodule = os.path.join(os.path.dirname(__file__), 'xxmodule.c') - return xxmodule + return os.path.join(os.path.dirname(__file__), 'xxmodule.c') + return os.path.join(srcdir, 'Modules', 'xxmodule.c') class BuildExtTestCase(support.TempdirManager, support.LoggingSilencer,