Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
also includes purelib in TestCParser import context
  • Loading branch information
Cycloctane committed Oct 5, 2025
commit 0aeffb2804165bc8c0bfdc1839471aedfe38fc9f
8 changes: 6 additions & 2 deletions Lib/test/test_peg_generator/test_c_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,15 @@ def setUpClass(cls):

with contextlib.ExitStack() as stack:
python_exe = stack.enter_context(support.setup_venv_with_pip_setuptools("venv"))
sitepackages = subprocess.check_output(
platlib_path = subprocess.check_output(
[python_exe, "-c", "import sysconfig; print(sysconfig.get_path('platlib'))"],
text=True,
).strip()
stack.enter_context(import_helper.DirsOnSysPath(sitepackages))
purelib_path = subprocess.check_output(
[python_exe, "-c", "import sysconfig; print(sysconfig.get_path('purelib'))"],
text=True,
).strip()
stack.enter_context(import_helper.DirsOnSysPath(platlib_path, purelib_path))
cls.addClassCleanup(stack.pop_all().close)

@support.requires_venv_with_pip()
Expand Down
Loading