summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests/test_build_ext.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/tests/test_build_ext.py')
-rw-r--r--Lib/distutils/tests/test_build_ext.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index a1c236a..5dea4dd 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -19,7 +19,11 @@ ALREADY_TESTED = False
def _get_source_filename():
srcdir = sysconfig.get_config_var('srcdir')
- return os.path.join(srcdir, 'Modules', 'xxmodule.c')
+ xxmodule = os.path.join(srcdir, 'Modules', 'xxmodule.c')
+ if not os.path.exists(xxmodule):
+ # local fallback
+ xxmodule = os.path.join(os.path.dirname(__file__), 'xxmodule.c')
+ return xxmodule
class BuildExtTestCase(support.TempdirManager,
support.LoggingSilencer,