Skip to content

Commit cbd1e15

Browse files
committed
Suppress pip compile without cache tag
1 parent df97ccd commit cbd1e15

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

Lib/ensurepip/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
177177
args += ["--user"]
178178
if verbosity:
179179
args += ["-" + "v" * verbosity]
180+
if sys.implementation.cache_tag is None:
181+
args += ["--no-compile"]
180182

181183
return _run_pip([*args, "pip"], [os.fsdecode(tmp_wheel_path)])
182184

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Enables patching in a ``_PY_DISABLE_SYS_CACHE_TAG`` preprocessor definition
2-
when building to force :attr:`sys.implementation.cache_tag` to ``None``.
3-
This has the effect of completely disabling automatic creation and reading
4-
of ``.pyc`` files.
1+
Enables patching the ``TAG`` preprocessor definition to override
2+
:attr:`sys.implementation.cache_tag` at build time. Setting it to ``NULL``
3+
has the effect of completely disabling automatic creation and use of
4+
``.pyc`` files.

0 commit comments

Comments
 (0)