diff options
author | Steve Dower <steve.dower@python.org> | 2019-09-11 15:16:27 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2019-09-11 15:16:27 (GMT) |
commit | 19f6940cd7fb91246b88e1fbdbce97a02e7f3fa1 (patch) | |
tree | 983246194856e3b69db2539db29cc129fdeaba26 /PC/layout/support/pip.py | |
parent | aa929273caca2f4e24e3aa9e790272fd4458ad35 (diff) | |
download | cpython-19f6940cd7fb91246b88e1fbdbce97a02e7f3fa1.zip cpython-19f6940cd7fb91246b88e1fbdbce97a02e7f3fa1.tar.gz cpython-19f6940cd7fb91246b88e1fbdbce97a02e7f3fa1.tar.bz2 |
bpo-38114: Do not include pip.ini in Nuget package (GH-15964)
Diffstat (limited to 'PC/layout/support/pip.py')
-rw-r--r-- | PC/layout/support/pip.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/PC/layout/support/pip.py b/PC/layout/support/pip.py index 4ad3b1d..c54acb2 100644 --- a/PC/layout/support/pip.py +++ b/PC/layout/support/pip.py @@ -33,11 +33,12 @@ 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 - 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): |