summaryrefslogtreecommitdiff
path: root/dev-python/pip/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
commit7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch)
tree4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /dev-python/pip/files
parentb284a3168fa91a038925d2ecf5e4791011ea5e7d (diff)
gentoo resync : 15.12.2019
Diffstat (limited to 'dev-python/pip/files')
-rw-r--r--dev-python/pip/files/pip-19.3.1-disable-system-install.patch17
-rw-r--r--dev-python/pip/files/pip-19.3.1-network-tests.patch66
-rw-r--r--dev-python/pip/files/pip-19.3.1-r2-disable-system-install.patch17
3 files changed, 100 insertions, 0 deletions
diff --git a/dev-python/pip/files/pip-19.3.1-disable-system-install.patch b/dev-python/pip/files/pip-19.3.1-disable-system-install.patch
new file mode 100644
index 000000000000..70583957bd74
--- /dev/null
+++ b/dev-python/pip/files/pip-19.3.1-disable-system-install.patch
@@ -0,0 +1,17 @@
+install: Raise an error to avoid breaking python-exec
+
+Running pip without --target, --root, or --user will result in packages
+being installed systemwide. This has a tendency to break python-exec if
+setuptools gets installed or upgraded.
+
+--- pip-19.1/src/pip/_internal/commands/install.py
++++ pip-19.1/src/pip/_internal/commands/install.py
+@@ -246,6 +246,9 @@ class InstallCommand(RequirementCommand):
+ if options.upgrade:
+ upgrade_strategy = options.upgrade_strategy
+
++ if not any((options.use_user_site, options.target_dir, options.root_path, options.prefix_path)):
++ raise CommandError("(Gentoo) Please run pip with the --user option to avoid breaking python-exec")
++
+ if options.build_dir:
+ options.build_dir = os.path.abspath(options.build_dir)
diff --git a/dev-python/pip/files/pip-19.3.1-network-tests.patch b/dev-python/pip/files/pip-19.3.1-network-tests.patch
new file mode 100644
index 000000000000..f194a7b34a90
--- /dev/null
+++ b/dev-python/pip/files/pip-19.3.1-network-tests.patch
@@ -0,0 +1,66 @@
+diff --git a/news/7359.trivial b/news/7359.trivial
+new file mode 100644
+index 000000000..e69de29bb
+diff --git a/tests/functional/test_freeze.py b/tests/functional/test_freeze.py
+index d13c931d0..2e35de3e6 100644
+--- a/tests/functional/test_freeze.py
++++ b/tests/functional/test_freeze.py
+@@ -721,6 +721,7 @@ def test_freeze_user(script, virtualenv, data):
+ assert 'simple2' not in result.stdout
+
+
++@pytest.mark.network
+ def test_freeze_path(tmpdir, script, data):
+ """
+ Test freeze with --path.
+@@ -734,5 +735,6 @@ def test_freeze_path(tmpdir, script, data):
+ _check_output(result.stdout, expected)
+
+
++@pytest.mark.network
+ def test_freeze_path_exclude_user(tmpdir, script, data):
+ """
+@@ -756,6 +758,7 @@ def test_freeze_path_exclude_user(tmpdir, script, data):
+ _check_output(result.stdout, expected)
+
+
++@pytest.mark.network
+ def test_freeze_path_multiple(tmpdir, script, data):
+ """
+ Test freeze with multiple --path arguments.
+diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py
+index a9eff081d..ba7a0a55c 100644
+--- a/tests/functional/test_install.py
++++ b/tests/functional/test_install.py
+@@ -1325,6 +1325,7 @@ def test_install_no_binary_disables_building_wheels(script, data, with_wheel):
+ assert "Running setup.py install for upper" in str(res), str(res)
+
+
++@pytest.mark.network
+ def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel):
+ to_install = data.packages.joinpath('pep517_setup_and_pyproject')
+ res = script.pip(
+diff --git a/tests/functional/test_install_config.py b/tests/functional/test_install_config.py
+index 176976c4e..308263928 100644
+--- a/tests/functional/test_install_config.py
++++ b/tests/functional/test_install_config.py
+@@ -133,6 +133,7 @@ def test_command_line_appends_correctly(script, data):
+ ), 'stdout: {}'.format(result.stdout)
+
+
++@pytest.mark.network
+ def test_config_file_override_stack(script, virtualenv):
+ """
+ Test config files (global, overriding a global config with a
+diff --git a/tests/functional/test_install_upgrade.py b/tests/functional/test_install_upgrade.py
+index 6d2eeb5dc..0024de4d4 100644
+--- a/tests/functional/test_install_upgrade.py
++++ b/tests/functional/test_install_upgrade.py
+@@ -8,6 +8,7 @@
+ from tests.lib.local_repos import local_checkout
+
+
++@pytest.mark.network
+ def test_no_upgrade_unless_requested(script):
+ """
+ No upgrade if not specifically requested.
diff --git a/dev-python/pip/files/pip-19.3.1-r2-disable-system-install.patch b/dev-python/pip/files/pip-19.3.1-r2-disable-system-install.patch
new file mode 100644
index 000000000000..8486c37f0c73
--- /dev/null
+++ b/dev-python/pip/files/pip-19.3.1-r2-disable-system-install.patch
@@ -0,0 +1,17 @@
+install: Raise an error to avoid breaking python-exec
+
+Running pip without --target, --root, or --user will result in packages
+being installed systemwide. This has a tendency to break python-exec if
+setuptools gets installed or upgraded.
+
+--- pip-19.1/src/pip/_internal/commands/install.py
++++ pip-19.1/src/pip/_internal/commands/install.py
+@@ -246,6 +246,9 @@ class InstallCommand(RequirementCommand):
+ if options.upgrade:
+ upgrade_strategy = options.upgrade_strategy
+
++ if not options.use_user_site and not options.target_dir and not options.root_path and not os.getenv('GENTOO_PIP_TESTING'):
++ raise CommandError("(Gentoo) Please run pip with the --user option to avoid breaking python-exec")
++
+ if options.build_dir:
+ options.build_dir = os.path.abspath(options.build_dir)