Commit 9aff9e5f authored by Ned Deily's avatar Ned Deily

Issue #12141: Install copies of template C module file so that

test_build_ext of test_distutils and test_command_build_ext of
test_packaging are no longer silently skipped when
run outside of a build directory.
parents b741327e 32d401bb
......@@ -22,6 +22,11 @@ from test.support import run_unittest
ALREADY_TESTED = False
def _get_source_filename():
# use installed copy if available
tests_f = os.path.join(os.path.dirname(__file__), 'xxmodule.c')
if os.path.exists(tests_f):
return tests_f
# otherwise try using copy from build directory
srcdir = sysconfig.get_config_var('srcdir')
return os.path.join(srcdir, 'Modules', 'xxmodule.c')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment