Accepting request 599442 from devel:languages:python

- update to 10.0.1
- refactor pip-8.1.2-shipped-requests-cabundle.patch
 * Switch the default repository to the new "PyPI 2.0" running at https://pypi.org/
 * big bunch of changes from 9.0.1 in NEWS.rst

OBS-URL: https://build.opensuse.org/request/show/599442
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pip?expand=0&rev=36
This commit is contained in:
Dominique Leuenberger 2018-04-26 11:34:24 +00:00 committed by Git OBS Bridge
commit 836026db78
5 changed files with 57 additions and 39 deletions

3
pip-10.0.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f2bd08e0cd1b06e10218feaf6fef299f473ba706582eb3bd9d52203fdbd7ee68
size 1246072

View File

@ -1,13 +1,24 @@
diff -ruN a/pip/_vendor/requests/certs.py b/pip/_vendor/requests/certs.py
--- a/pip/_vendor/requests/certs.py 2014-05-16 20:03:31.000000000 +0200
+++ b/pip/_vendor/requests/certs.py 2014-07-03 09:54:46.751966582 +0200
@@ -19,8 +19,7 @@
except ImportError:
def where():
"""Return the preferred certificate bundle."""
- # vendored bundle inside Requests
- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
+ return "/etc/ssl/ca-bundle.pem"
if __name__ == '__main__':
print(where())
Index: pip-10.0.1/src/pip/_vendor/certifi/core.py
===================================================================
--- pip-10.0.1.orig/src/pip/_vendor/certifi/core.py
+++ pip-10.0.1/src/pip/_vendor/certifi/core.py
@@ -7,7 +7,6 @@ certifi.py
This module returns the installation location of cacert.pem.
"""
-import os
import warnings
@@ -19,10 +18,7 @@ class DeprecatedBundleWarning(Deprecatio
def where():
- f = os.path.dirname(__file__)
-
- return os.path.join(f, 'cacert.pem')
-
+ return '/etc/ssl/ca-bundle.pem'
def old_where():
warnings.warn(

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d
size 1197370

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Apr 20 07:48:59 UTC 2018 - mimi.vx@gmail.com
- update to 10.0.1
- refactor pip-8.1.2-shipped-requests-cabundle.patch
* Switch the default repository to the new "PyPI 2.0" running at https://pypi.org/
* big bunch of changes from 9.0.1 in NEWS.rst
-------------------------------------------------------------------
Wed Mar 29 13:52:06 UTC 2017 - jmatejek@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package python-pip
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,41 +16,41 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# NOTE(saschpe): git invocation and pythonpath issues with testrepository
# enable testing with a build conditional (off by default):
%bcond_with test
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pip
Version: 9.0.1
Version: 10.0.1
Release: 0
Url: http://www.pip-installer.org
Summary: Pip installs packages. Python packages. An easy_install replacement
License: MIT
Group: Development/Languages/Python
Source: https://pypi.io/packages/source/p/pip/pip-%{version}.tar.gz
URL: http://www.pip-installer.org
Source: https://files.pythonhosted.org/packages/source/p/pip/pip-%{version}.tar.gz
Patch0: pip-8.1.2-shipped-requests-cabundle.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
# Test requirements:
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module scripttest >= 1.3}
BuildRequires: %{python_module virtualenv >= 1.10}
%endif
Requires: ca-certificates
Requires: coreutils
Requires: python-setuptools
Requires: python-xml
Recommends: ca-certificates-mozilla
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: ca-certificates-mozilla
BuildArch: noarch
%if %{with test}
# Test requirements:
BuildRequires: %{python_module docutils}
BuildRequires: %{python_module freezegun}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pretend}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module scripttest >= 1.3}
BuildRequires: %{python_module virtualenv >= 1.10}
%endif
%python_subpackages
%description
@ -58,14 +58,13 @@ Pip is a replacement for easy_install. It uses mostly the same techniques for
finding packages, so packages that were made easy_installable should be
pip-installable as well.
%prep
%setup -q -n pip-%{version}
%patch0 -p1
find pip/_vendor -name *.py -exec \
sed -i "s|#!/usr/bin/env python||g" {} ";" # Fix non-executable script
find src/pip/_vendor -name *.py -exec \
sed -i "s|#!%{_bindir}/env python||g" {} ";" # Fix non-executable script
#sed -i "s|#!/usr/bin/env python||g" pip/__init__.py # Fix non-executable script
rm pip/_vendor/requests/cacert.pem
rm src/pip/_vendor/certifi/cacert.pem
%build
%python_build
@ -77,7 +76,7 @@ rm pip/_vendor/requests/cacert.pem
%if %{with test}
%check
%python_exec setup.py test
%python_expand py.test-%{$python_version}
%endif
%pre
@ -102,8 +101,8 @@ PRIO=$(echo %{python_version} | tr -d .)
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS.txt CHANGES.txt LICENSE.txt README.rst
%license LICENSE.txt
%doc AUTHORS.txt NEWS.rst README.rst
%{_bindir}/pip
%python2_only %{_bindir}/pip2
%python3_only %{_bindir}/pip3