summaryrefslogtreecommitdiffstats
path: root/PC/layout
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2019-07-24 22:13:22 (GMT)
committerGitHub <noreply@github.com>2019-07-24 22:13:22 (GMT)
commit123536fdab7b8def15c859aa70232bc55ec73096 (patch)
treec46ba6c0367d90525d6981cc950965029594f9b8 /PC/layout
parente018dc52d1268bc0c5e4037c132e463f1a4002af (diff)
downloadcpython-123536fdab7b8def15c859aa70232bc55ec73096.zip
cpython-123536fdab7b8def15c859aa70232bc55ec73096.tar.gz
cpython-123536fdab7b8def15c859aa70232bc55ec73096.tar.bz2
bpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939)
Diffstat (limited to 'PC/layout')
-rw-r--r--PC/layout/main.py2
-rw-r--r--PC/layout/support/pip.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/PC/layout/main.py b/PC/layout/main.py
index c39aab2..111f8aa 100644
--- a/PC/layout/main.py
+++ b/PC/layout/main.py
@@ -228,7 +228,7 @@ def get_layout(ns):
if ns.include_pip:
for dest, src in get_pip_layout(ns):
- if isinstance(src, tuple) or not (
+ if not isinstance(src, tuple) and (
src in EXCLUDE_FROM_LIB or src in EXCLUDE_FROM_PACKAGED_LIB
):
continue
diff --git a/PC/layout/support/pip.py b/PC/layout/support/pip.py
index eada456..4ad3b1d 100644
--- a/PC/layout/support/pip.py
+++ b/PC/layout/support/pip.py
@@ -33,7 +33,11 @@ def get_pip_layout(ns):
pkg_root = "packages/{}" if ns.zip_lib else "Lib/site-packages/{}"
for dest, src in rglob(pip_dir, "**/*"):
yield pkg_root.format(dest), src
- yield "pip.ini", ("pip.ini", b"[global]\nuser=yes")
+ content = "\n".join(
+ "[{}]\nuser=yes".format(n)
+ for n in ["install", "uninstall", "freeze", "list"]
+ )
+ yield "pip.ini", ("pip.ini", content.encode())
def extract_pip_files(ns):