mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #25985: sys.version_info is now used instead of sys.version
to format short Python version.
This commit is contained in:
parent
a9725f86a9
commit
885bdc4946
24 changed files with 56 additions and 52 deletions
|
@ -27,7 +27,7 @@ class BuildTestCase(support.TempdirManager,
|
|||
# build_platlib is 'build/lib.platform-x.x[-pydebug]'
|
||||
# examples:
|
||||
# build/lib.macosx-10.3-i386-2.7
|
||||
plat_spec = '.%s-%s' % (cmd.plat_name, sys.version[0:3])
|
||||
plat_spec = '.%s-%d.%d' % (cmd.plat_name, *sys.version_info[:2])
|
||||
if hasattr(sys, 'gettotalrefcount'):
|
||||
self.assertTrue(cmd.build_platlib.endswith('-pydebug'))
|
||||
plat_spec += '-pydebug'
|
||||
|
@ -42,7 +42,8 @@ class BuildTestCase(support.TempdirManager,
|
|||
self.assertEqual(cmd.build_temp, wanted)
|
||||
|
||||
# build_scripts is build/scripts-x.x
|
||||
wanted = os.path.join(cmd.build_base, 'scripts-' + sys.version[0:3])
|
||||
wanted = os.path.join(cmd.build_base,
|
||||
'scripts-%d.%d' % sys.version_info[:2])
|
||||
self.assertEqual(cmd.build_scripts, wanted)
|
||||
|
||||
# executable is os.path.normpath(sys.executable)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue