diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index a19a2895828116..18eae65eed3348 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -193,6 +193,12 @@ README.rst is now included in the list of distutils standard READMEs and therefore included in source distributions. (Contributed by Ryan Gonzalez in :issue:`11913`.) +ensurepip +--------- + +The ``wheel`` package will now be installed by :mod:`ensurepip`. Enabling pip's +wheel cache by default. + http.server ----------- diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py index d69e09fab084e6..a0ffa4dbaff307 100644 --- a/Lib/ensurepip/__init__.py +++ b/Lib/ensurepip/__init__.py @@ -12,9 +12,12 @@ _PIP_VERSION = "9.0.1" +_WHEEL_VERSION = "0.30.0" + _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION), ("pip", _PIP_VERSION), + ("wheel", _WHEEL_VERSION), ] diff --git a/Lib/ensurepip/_bundled/wheel-0.30.0-py2.py3-none-any.whl b/Lib/ensurepip/_bundled/wheel-0.30.0-py2.py3-none-any.whl new file mode 100644 index 00000000000000..b7fbaa46bf7dcf Binary files /dev/null and b/Lib/ensurepip/_bundled/wheel-0.30.0-py2.py3-none-any.whl differ diff --git a/Lib/test/test_ensurepip.py b/Lib/test/test_ensurepip.py index 89966893092851..5e39cbcef3e9db 100644 --- a/Lib/test/test_ensurepip.py +++ b/Lib/test/test_ensurepip.py @@ -41,13 +41,13 @@ def test_basic_bootstrapping(self): self.run_pip.assert_called_once_with( [ "install", "--no-index", "--find-links", - unittest.mock.ANY, "setuptools", "pip", + unittest.mock.ANY, "setuptools", "pip", "wheel", ], unittest.mock.ANY, ) additional_paths = self.run_pip.call_args[0][1] - self.assertEqual(len(additional_paths), 2) + self.assertEqual(len(additional_paths), 3) def test_bootstrapping_with_root(self): ensurepip.bootstrap(root="/foo/bar/") @@ -56,7 +56,7 @@ def test_bootstrapping_with_root(self): [ "install", "--no-index", "--find-links", unittest.mock.ANY, "--root", "/foo/bar/", - "setuptools", "pip", + "setuptools", "pip", "wheel", ], unittest.mock.ANY, ) @@ -67,7 +67,7 @@ def test_bootstrapping_with_user(self): self.run_pip.assert_called_once_with( [ "install", "--no-index", "--find-links", - unittest.mock.ANY, "--user", "setuptools", "pip", + unittest.mock.ANY, "--user", "setuptools", "pip", "wheel", ], unittest.mock.ANY, ) @@ -78,7 +78,7 @@ def test_bootstrapping_with_upgrade(self): self.run_pip.assert_called_once_with( [ "install", "--no-index", "--find-links", - unittest.mock.ANY, "--upgrade", "setuptools", "pip", + unittest.mock.ANY, "--upgrade", "setuptools", "pip", "wheel", ], unittest.mock.ANY, ) @@ -89,7 +89,7 @@ def test_bootstrapping_with_verbosity_1(self): self.run_pip.assert_called_once_with( [ "install", "--no-index", "--find-links", - unittest.mock.ANY, "-v", "setuptools", "pip", + unittest.mock.ANY, "-v", "setuptools", "pip", "wheel", ], unittest.mock.ANY, ) @@ -100,7 +100,7 @@ def test_bootstrapping_with_verbosity_2(self): self.run_pip.assert_called_once_with( [ "install", "--no-index", "--find-links", - unittest.mock.ANY, "-vv", "setuptools", "pip", + unittest.mock.ANY, "-vv", "setuptools", "pip", "wheel", ], unittest.mock.ANY, ) @@ -111,7 +111,7 @@ def test_bootstrapping_with_verbosity_3(self): self.run_pip.assert_called_once_with( [ "install", "--no-index", "--find-links", - unittest.mock.ANY, "-vvv", "setuptools", "pip", + unittest.mock.ANY, "-vvv", "setuptools", "pip", "wheel", ], unittest.mock.ANY, ) @@ -187,8 +187,8 @@ def test_uninstall(self): self.run_pip.assert_called_once_with( [ - "uninstall", "-y", "--disable-pip-version-check", "pip", - "setuptools", + "uninstall", "-y", "--disable-pip-version-check","wheel", + "pip", "setuptools", ] ) @@ -198,8 +198,8 @@ def test_uninstall_with_verbosity_1(self): self.run_pip.assert_called_once_with( [ - "uninstall", "-y", "--disable-pip-version-check", "-v", "pip", - "setuptools", + "uninstall", "-y", "--disable-pip-version-check", "-v", "wheel", + "pip", "setuptools", ] ) @@ -209,8 +209,8 @@ def test_uninstall_with_verbosity_2(self): self.run_pip.assert_called_once_with( [ - "uninstall", "-y", "--disable-pip-version-check", "-vv", "pip", - "setuptools", + "uninstall", "-y", "--disable-pip-version-check", "-vv", "wheel", + "pip", "setuptools", ] ) @@ -221,7 +221,7 @@ def test_uninstall_with_verbosity_3(self): self.run_pip.assert_called_once_with( [ "uninstall", "-y", "--disable-pip-version-check", "-vvv", - "pip", "setuptools", + "wheel", "pip", "setuptools", ] ) @@ -261,13 +261,13 @@ def test_basic_bootstrapping(self): self.run_pip.assert_called_once_with( [ "install", "--no-index", "--find-links", - unittest.mock.ANY, "setuptools", "pip", + unittest.mock.ANY, "setuptools", "pip", "wheel", ], unittest.mock.ANY, ) additional_paths = self.run_pip.call_args[0][1] - self.assertEqual(len(additional_paths), 2) + self.assertEqual(len(additional_paths), 3) self.assertEqual(exit_code, 0) def test_bootstrapping_error_code(self): @@ -292,8 +292,8 @@ def test_basic_uninstall(self): self.run_pip.assert_called_once_with( [ - "uninstall", "-y", "--disable-pip-version-check", "pip", - "setuptools", + "uninstall", "-y", "--disable-pip-version-check", "wheel", + "pip", "setuptools", ] ) diff --git a/Misc/NEWS.d/next/Library/2017-09-29-13-08-49.bpo-31634.9Bk7ol.rst b/Misc/NEWS.d/next/Library/2017-09-29-13-08-49.bpo-31634.9Bk7ol.rst new file mode 100644 index 00000000000000..a514e95b8fcb69 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2017-09-29-13-08-49.bpo-31634.9Bk7ol.rst @@ -0,0 +1 @@ +Install `wheel` in `ensurepip` by default