bpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939)

This commit is contained in:
Steve Dower 2019-07-24 15:13:22 -07:00 committed by GitHub
parent e018dc52d1
commit 123536fdab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 35 deletions

View file

@ -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):