changeset: 71033:c8ffa3891d5e branch: 2.7 parent: 71030:abfe28e7e5cd user: Ned Deily date: Tue Jun 28 00:39:19 2011 -0700 files: Lib/distutils/tests/test_build_ext.py Makefile.pre.in Misc/NEWS description: Issue #12141: Install a copy of template C module file so that test_build_ext of test_distutils is no longer silently skipped when run outside of a build directory. diff -r abfe28e7e5cd -r c8ffa3891d5e Lib/distutils/tests/test_build_ext.py --- a/Lib/distutils/tests/test_build_ext.py Mon Jun 27 23:41:53 2011 -0700 +++ b/Lib/distutils/tests/test_build_ext.py Tue Jun 28 00:39:19 2011 -0700 @@ -19,6 +19,11 @@ 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') if srcdir is None: return os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') diff -r abfe28e7e5cd -r c8ffa3891d5e Makefile.pre.in --- a/Makefile.pre.in Mon Jun 27 23:41:53 2011 -0700 +++ b/Makefile.pre.in Tue Jun 28 00:39:19 2011 -0700 @@ -869,7 +869,7 @@ unittest unittest/test \ lib-old \ curses pydoc_data $(MACHDEPS) -libinstall: build_all $(srcdir)/Lib/$(PLATDIR) +libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ if test ! -d $(DESTDIR)$$i; then \ @@ -925,6 +925,10 @@ done; \ done $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt + if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST) -f \ diff -r abfe28e7e5cd -r c8ffa3891d5e Misc/NEWS --- a/Misc/NEWS Mon Jun 27 23:41:53 2011 -0700 +++ b/Misc/NEWS Tue Jun 28 00:39:19 2011 -0700 @@ -64,6 +64,10 @@ Tests ----- +- Issue #12141: Install a copy of template C module file so that + test_build_ext of test_distutils is no longer silently skipped when + run outside of a build directory. + - Issue #8746: Add additional tests for os.chflags() and os.lchflags(). Patch by Garrett Cooper.

AltStyle によって変換されたページ (->オリジナル) /