]> granicus.if.org Git - python/commitdiff
backport from the trunk, to fix test_tools with srcdir != builddir
authordoko@ubuntu.com <doko@ubuntu.com>
Mon, 10 Sep 2012 12:19:42 +0000 (14:19 +0200)
committerdoko@ubuntu.com <doko@ubuntu.com>
Mon, 10 Sep 2012 12:19:42 +0000 (14:19 +0200)
changeset:   77827:c23b442b5d5e
user:        Antoine Pitrou <solipsis@pitrou.net>
date:        Thu Jun 28 01:20:26 2012 +0200
summary:     Avoid using scrdir, it's broken.

changeset:   77826:f0e58e778215
user:        Neil Schemenauer <nas@arctrix.com>
date:        Wed Jun 27 15:58:37 2012 -0600
summary:     Fix bug in test_tools that prevented building is separate directory.

Lib/test/test_tools.py

index cfe13acc2df9bc008c36cf8eae6badea2bbe065a..42816a2c4f60a25608be136e36c16eac04a1821e 100644 (file)
@@ -18,8 +18,8 @@ if not sysconfig.is_python_build():
     # and run the tests in that case too?
     raise unittest.SkipTest('test irrelevant for an installed Python')
 
-srcdir = sysconfig.get_config_var('projectbase')
-basepath = os.path.join(os.getcwd(), srcdir, 'Tools')
+basepath = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))),
+                        'Tools')
 scriptsdir = os.path.join(basepath, 'scripts')