diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2022-04-10 12:41:44 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-10 12:41:44 -0400 |
| commit | ee180a7ea80f9b1949a2f7480cea97102370a193 (patch) | |
| tree | 0bf283822f42c697aa6e1034353caa329ffe8ddf | |
| parent | a64a054c3b9f6da612b4faeaf18efc5b658d3094 (diff) | |
| parent | 1c23f5e1e4b18b50081cbabb2dea22bf345f5894 (diff) | |
| download | python-setuptools-git-ee180a7ea80f9b1949a2f7480cea97102370a193.tar.gz | |
Merge pull request #133 from mgorny/build_dir-cache_tag
Use cache_tag in default build_platlib dir
| -rw-r--r-- | distutils/command/build.py | 3 | ||||
| -rw-r--r-- | distutils/tests/test_build.py | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/distutils/command/build.py b/distutils/command/build.py index 4355a632..9606b81a 100644 --- a/distutils/command/build.py +++ b/distutils/command/build.py @@ -81,7 +81,8 @@ class build(Command): "--plat-name only supported on Windows (try " "using './configure --help' on your platform)") - plat_specifier = ".%s-%d.%d" % (self.plat_name, *sys.version_info[:2]) + plat_specifier = ".%s-%s" % (self.plat_name, + sys.implementation.cache_tag) # Make it so Python 2.x and Python 2.x with --with-pydebug don't # share the same build directories. Doing so confuses the build diff --git a/distutils/tests/test_build.py b/distutils/tests/test_build.py index 83a9e4f4..93724419 100644 --- a/distutils/tests/test_build.py +++ b/distutils/tests/test_build.py @@ -24,10 +24,10 @@ class BuildTestCase(support.TempdirManager, wanted = os.path.join(cmd.build_base, 'lib') self.assertEqual(cmd.build_purelib, wanted) - # build_platlib is 'build/lib.platform-x.x[-pydebug]' + # build_platlib is 'build/lib.platform-cache_tag[-pydebug]' # examples: - # build/lib.macosx-10.3-i386-2.7 - plat_spec = '.%s-%d.%d' % (cmd.plat_name, *sys.version_info[:2]) + # build/lib.macosx-10.3-i386-cpython39 + plat_spec = '.%s-%s' % (cmd.plat_name, sys.implementation.cache_tag) if hasattr(sys, 'gettotalrefcount'): self.assertTrue(cmd.build_platlib.endswith('-pydebug')) plat_spec += '-pydebug' |
