summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_embed.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-07-11 21:00:28 (GMT)
committerGitHub <noreply@github.com>2024-07-11 21:00:28 (GMT)
commit35f7155bc39b8e5212b90a2ee96cb107b51e0e83 (patch)
treef29a5ec83ce96d65bc770ade3fad467ca3f6bbeb /Lib/test/test_embed.py
parentc6dbfbbe3c24cf2dd6a589904383f28cd1a1f4db (diff)
downloadcpython-35f7155bc39b8e5212b90a2ee96cb107b51e0e83.zip
cpython-35f7155bc39b8e5212b90a2ee96cb107b51e0e83.tar.gz
cpython-35f7155bc39b8e5212b90a2ee96cb107b51e0e83.tar.bz2
[3.13] gh-121103: Put free-threaded libraries in `lib/python3.14t` (GH-121293) (#121631)
On POSIX systems, excluding macOS framework installs, the lib directory for the free-threaded build now includes a "t" suffix to avoid conflicts with a co-located default build installation. (cherry picked from commit e8c91d90ba8fab410a27fad4f709cc73f6ffcbf4) Co-authored-by: Sam Gross <colesbury@gmail.com>
Diffstat (limited to 'Lib/test/test_embed.py')
-rw-r--r--Lib/test/test_embed.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py
index 634513e..30dab1f 100644
--- a/Lib/test/test_embed.py
+++ b/Lib/test/test_embed.py
@@ -48,6 +48,8 @@ API_ISOLATED = 3
INIT_LOOPS = 4
MAX_HASH_SEED = 4294967295
+ABI_THREAD = 't' if sysconfig.get_config_var('Py_GIL_DISABLED') else ''
+
# If we are running from a build dir, but the stdlib has been installed,
# some tests need to expect different results.
@@ -1285,11 +1287,11 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
ver = sys.version_info
return [
os.path.join(prefix, sys.platlibdir,
- f'python{ver.major}{ver.minor}.zip'),
+ f'python{ver.major}{ver.minor}{ABI_THREAD}.zip'),
os.path.join(prefix, sys.platlibdir,
- f'python{ver.major}.{ver.minor}'),
+ f'python{ver.major}.{ver.minor}{ABI_THREAD}'),
os.path.join(exec_prefix, sys.platlibdir,
- f'python{ver.major}.{ver.minor}', 'lib-dynload'),
+ f'python{ver.major}.{ver.minor}{ABI_THREAD}', 'lib-dynload'),
]
@contextlib.contextmanager
@@ -1343,7 +1345,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
expected_paths = [paths[0], os.path.join(home, 'DLLs'), stdlib]
else:
version = f'{sys.version_info.major}.{sys.version_info.minor}'
- stdlib = os.path.join(home, sys.platlibdir, f'python{version}')
+ stdlib = os.path.join(home, sys.platlibdir, f'python{version}{ABI_THREAD}')
expected_paths = self.module_search_paths(prefix=home, exec_prefix=home)
config = {
@@ -1384,7 +1386,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
expected_paths = [paths[0], os.path.join(home, 'DLLs'), stdlib]
else:
version = f'{sys.version_info.major}.{sys.version_info.minor}'
- stdlib = os.path.join(home, sys.platlibdir, f'python{version}')
+ stdlib = os.path.join(home, sys.platlibdir, f'python{version}{ABI_THREAD}')
expected_paths = self.module_search_paths(prefix=home, exec_prefix=home)
config = {
@@ -1515,7 +1517,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
if not MS_WINDOWS:
lib_dynload = os.path.join(pyvenv_home,
sys.platlibdir,
- f'python{ver.major}.{ver.minor}',
+ f'python{ver.major}.{ver.minor}{ABI_THREAD}',
'lib-dynload')
os.makedirs(lib_dynload)
else: