From ea597cee0d43a4849fd9ee666beb6fe70fad1f2ee16706c6301cae90805a7422 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 13 Nov 2021 16:28:39 +0000 Subject: [PATCH] Remove conflicts. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=94 --- pip-shipped-requests-cabundle.patch | 37 +++++++++++++++++++++++++---- python-pip.spec | 1 + 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/pip-shipped-requests-cabundle.patch b/pip-shipped-requests-cabundle.patch index 6201245..37bb911 100644 --- a/pip-shipped-requests-cabundle.patch +++ b/pip-shipped-requests-cabundle.patch @@ -1,7 +1,10 @@ -Index: pip-21.3.1/src/pip/_vendor/certifi/core.py -=================================================================== ---- pip-21.3.1.orig/src/pip/_vendor/certifi/core.py -+++ pip-21.3.1/src/pip/_vendor/certifi/core.py +--- + src/pip/_vendor/certifi/core.py | 70 ++++------------------------------------ + tests/unit/test_options.py | 5 ++ + 2 files changed, 13 insertions(+), 62 deletions(-) + +--- a/src/pip/_vendor/certifi/core.py ++++ b/src/pip/_vendor/certifi/core.py @@ -5,72 +5,18 @@ certifi.py ~~~~~~~~~~ @@ -83,3 +86,29 @@ Index: pip-21.3.1/src/pip/_vendor/certifi/core.py def contents(): - return read_text("certifi", "cacert.pem", encoding="ascii") + return read_text(encoding="ascii") +--- a/tests/unit/test_options.py ++++ b/tests/unit/test_options.py +@@ -1,4 +1,5 @@ + import os ++import os.path + from contextlib import contextmanager + from optparse import Values + from tempfile import NamedTemporaryFile +@@ -11,6 +12,7 @@ from pip._internal.cli.main import main + from pip._internal.commands import create_command + from pip._internal.commands.configuration import ConfigurationCommand + from pip._internal.exceptions import PipError ++from pip._vendor.certifi import where + from tests.lib.options_helpers import AddFakeCommandMixin + from tests.lib.path import Path + +@@ -620,6 +622,9 @@ class TestOptionsConfigFiles: + else: + assert expect == cmd._determine_file(options, need_value=False) + ++ def test_certificates(self): ++ assert os.path.exists(where()) ++ + + class TestOptionsExpandUser(AddFakeCommandMixin): + def test_cache_dir(self) -> None: diff --git a/python-pip.spec b/python-pip.spec index 2982156..0f87c00 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -50,6 +50,7 @@ Source: https://github.com/pypa/pip/archive/%{version}.tar.gz#/pip-%{ver # PATCH-FIX-OPENSUSE pip-shipped-requests-cabundle.patch -- adapted patch from python-certifi package Patch0: pip-shipped-requests-cabundle.patch BuildRequires: %{python_module setuptools >= 40.8.0} +BuildRequires: ca-certificates BuildRequires: fdupes BuildRequires: python-rpm-macros >= 20210929 Requires: ca-certificates