diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-13 23:04:17 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-13 23:04:17 (GMT) |
commit | 68c50950c9267b972a2576f2094c6feac457a4f2 (patch) | |
tree | 9e5918417d81deaa95ffd6adadb233823f501826 /Lib/distutils/tests | |
parent | 811d62489cc2f1a48ec696669727cafe75990c4e (diff) | |
download | cpython-68c50950c9267b972a2576f2094c6feac457a4f2.zip cpython-68c50950c9267b972a2576f2094c6feac457a4f2.tar.gz cpython-68c50950c9267b972a2576f2094c6feac457a4f2.tar.bz2 |
Merged revisions 69598 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r69598 | tarek.ziade | 2009-02-14 00:00:43 +0100 (Sat, 14 Feb 2009) | 1 line
Fixed #4524: distutils build_script command failed with --with-suffix=3
........
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r-- | Lib/distutils/tests/test_build_scripts.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_build_scripts.py b/Lib/distutils/tests/test_build_scripts.py index 666ca44..2acfab8 100644 --- a/Lib/distutils/tests/test_build_scripts.py +++ b/Lib/distutils/tests/test_build_scripts.py @@ -5,6 +5,7 @@ import unittest from distutils.command.build_scripts import build_scripts from distutils.core import Distribution +from distutils import sysconfig from distutils.tests import support @@ -73,6 +74,33 @@ class BuildScriptsTestCase(support.TempdirManager, f.write(text) f.close() + def test_version_int(self): + source = self.mkdtemp() + target = self.mkdtemp() + expected = self.write_sample_scripts(source) + + + cmd = self.get_build_scripts_cmd(target, + [os.path.join(source, fn) + for fn in expected]) + cmd.finalize_options() + + # http://bugs.python.org/issue4524 + # + # On linux-g++-32 with command line `./configure --enable-ipv6 + # --with-suffix=3`, python is compiled okay but the build scripts + # failed when writing the name of the executable + old = sysconfig._config_vars.get('VERSION') + sysconfig._config_vars['VERSION'] = 4 + try: + cmd.run() + finally: + if old is not None: + sysconfig._config_vars['VERSION'] = old + + built = os.listdir(target) + for name in expected: + self.assert_(name in built) def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) |