OPTIONS = {
"stable": {"help": "stable ABI stub"},
"pip": {"help": "pip"},
+ "pip-user": {"help": "pip.ini file for default --user"},
"distutils": {"help": "distutils"},
"tcltk": {"help": "Tcl, Tk and tkinter"},
"idle": {"help": "Idle"},
"options": [
"stable",
"pip",
+ "pip-user",
"distutils",
"tcltk",
"idle",
pkg_root = "packages/{}" if ns.zip_lib else "Lib/site-packages/{}"
for dest, src in rglob(pip_dir, "**/*"):
yield pkg_root.format(dest), src
- content = "\n".join(
- "[{}]\nuser=yes".format(n)
- for n in ["install", "uninstall", "freeze", "list"]
- )
- yield "pip.ini", ("pip.ini", content.encode())
+ if ns.include_pip_user:
+ 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):