[Python-checkins] bpo-38114: Do not include pip.ini in Nuget package (GH-15964)
Miss Islington (bot)
webhook-mailer at python.org
Wed Sep 11 11:57:59 EDT 2019
https://github.com/python/cpython/commit/436cd2c20b1d7c86be1c53a3ba3bceefcaff2b73
commit: 436cd2c20b1d7c86be1c53a3ba3bceefcaff2b73
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-09-11T08:57:54-07:00
summary:
bpo-38114: Do not include pip.ini in Nuget package (GH-15964)
(cherry picked from commit 19f6940cd7fb91246b88e1fbdbce97a02e7f3fa1)
Co-authored-by: Steve Dower <steve.dower at python.org>
files:
A Misc/NEWS.d/next/Windows/2019-09-11-15-24-04.bpo-38114.cc0E5E.rst
M PC/layout/support/options.py
M PC/layout/support/pip.py
diff --git a/Misc/NEWS.d/next/Windows/2019-09-11-15-24-04.bpo-38114.cc0E5E.rst b/Misc/NEWS.d/next/Windows/2019-09-11-15-24-04.bpo-38114.cc0E5E.rst
new file mode 100644
index 000000000000..5dab8d728e88
--- /dev/null
+++ b/Misc/NEWS.d/next/Windows/2019-09-11-15-24-04.bpo-38114.cc0E5E.rst
@@ -0,0 +1 @@
+The ``pip.ini`` is no longer included in the Nuget package.
diff --git a/PC/layout/support/options.py b/PC/layout/support/options.py
index c8ae4e30a8c4..5e1543b59ccd 100644
--- a/PC/layout/support/options.py
+++ b/PC/layout/support/options.py
@@ -17,6 +17,7 @@ def public(f):
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"},
@@ -42,6 +43,7 @@ def public(f):
"options": [
"stable",
"pip",
+ "pip-user",
"distutils",
"tcltk",
"idle",
diff --git a/PC/layout/support/pip.py b/PC/layout/support/pip.py
index 4ad3b1dd5bc0..c54acb250a25 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):
More information about the Python-checkins
mailing list