summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests/test_build_ext.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2010-03-06 01:18:27 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2010-03-06 01:18:27 (GMT)
commitfbf50b8c7c6c1201f6060d0e01bc601c79e57e32 (patch)
treec1199a6dc626aea8150f58e7dda56626dfb43bb7 /Lib/distutils/tests/test_build_ext.py
parentb30868a391b85d24b7d1abe41c137a9d75bfcebc (diff)
downloadcpython-fbf50b8c7c6c1201f6060d0e01bc601c79e57e32.zip
cpython-fbf50b8c7c6c1201f6060d0e01bc601c79e57e32.tar.gz
cpython-fbf50b8c7c6c1201f6060d0e01bc601c79e57e32.tar.bz2
provide a fallback for xxmodule.c in case the buildir is not present
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,