Hello community,

here is the log from the commit of package python-pip for openSUSE:Factory 
checked in at 2017-02-27 18:36:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pip (Old)
 and      /work/SRC/openSUSE:Factory/.python-pip.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pip"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pip/python-pip.changes    2017-01-23 
11:31:09.434906363 +0100
+++ /work/SRC/openSUSE:Factory/.python-pip.new/python-pip.changes       
2017-02-27 18:36:15.523980564 +0100
@@ -1,0 +2,10 @@
+Thu Feb 23 15:31:57 UTC 2017 - [email protected]
+
+- update for singlespec
+- fix alternative priorities
+- drop cacert.pem and add pip-8.1.2-shipped-requests-cabundle.patch
+  to ensure function without it
+- add ca-certificates{,-mozilla} dependency to ensure existence of CA bundle
+- add fdupes
+
+-------------------------------------------------------------------

New:
----
  pip-8.1.2-shipped-requests-cabundle.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pip.spec ++++++
--- /var/tmp/diff_new_pack.NumRv4/_old  2017-02-27 18:36:16.043907106 +0100
+++ /var/tmp/diff_new_pack.NumRv4/_new  2017-02-27 18:36:16.043907106 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pip
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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
@@ -20,6 +20,7 @@
 # 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
 Release:        0
@@ -28,49 +29,55 @@
 License:        MIT
 Group:          Development/Languages/Python
 Source:         https://pypi.io/packages/source/p/pip/pip-%{version}.tar.gz
+Patch0:         pip-8.1.2-shipped-requests-cabundle.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  python-devel
-BuildRequires:  python-setuptools
+BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
 %if %{with test}
 # Test requirements:
-BuildRequires:  python-mock
-BuildRequires:  python-pytest
-BuildRequires:  python-scripttest >= 1.3
-BuildRequires:  python-virtualenv >= 1.10
+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
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-BuildRequires:  python-argparse
-Requires:       python-argparse
-%{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
 BuildArch:      noarch
-%endif
+
+%python_subpackages
 
 %description
 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}
-sed -i "s|#!/usr/bin/env python||g" pip/__init__.py # Fix non-executable script
+%patch0 -p1
+find pip/_vendor -name *.py -exec \
+    sed -i "s|#!/usr/bin/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
 
 %build
-python setup.py build
+%python_build
 
 %install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-rm %{buildroot}%{_bindir}/pip
-ln -s %{_bindir}/pip%{py_ver} %{buildroot}%{_bindir}/pip
+%python_install
+%prepare_alternative pip
+%fdupes %{buildroot}%{_prefix}
 
 %if %{with test}
 %check
-python setup.py test
+%python_exec setup.py test
 %endif
 
 %pre
@@ -79,23 +86,34 @@
 [ -h %{_bindir}/pip ] || rm -f %{_bindir}/pip
 
 %post
-update-alternatives --install %{_bindir}/pip pip %{_bindir}/pip%{py_ver} 20
+# can't use `python_install_alternative` because it's pipX.Y, not pip-X.Y
+PRIO=$(echo %{python_version} | tr -d .)
+%ifpypy3
+%install_alternative pip %{_bindir}/pip-%{pypy3_bin_suffix} $PRIO
+%else
+%install_alternative pip %{_bindir}/pip%{python_version} $PRIO
+%endif
 
 %preun
-if [ $1 -eq 0 ] ; then
-    update-alternatives --remove pip %{_bindir}/pip%{py_ver}
-fi
+%ifpypy3
+%uninstall_alternative pip %{_bindir}/pip-%{pypy3_bin_suffix}
+%else
+%uninstall_alternative pip %{_bindir}/pip%{python_version}
+%endif
 
-%files
+%files %{python_files}
 %defattr(-,root,root,-)
 %doc AUTHORS.txt CHANGES.txt LICENSE.txt README.rst
-%ghost %{_bindir}/pip
-%{_bindir}/pip2
-%{_bindir}/pip%{py_ver}
-%{python_sitelib}/pip-%{version}-py%{py_ver}.egg-info
-%{python_sitelib}/pip
-%if 0%{?suse_version} >= 1230
-%ghost %{_sysconfdir}/alternatives/pip
+%{_bindir}/pip
+%python2_only %{_bindir}/pip2
+%python3_only %{_bindir}/pip3
+%ifpypy3
+%{_bindir}/pip-%{pypy3_bin_suffix}
+%else
+%{_bindir}/pip%{python_version}
 %endif
+%ghost %{_sysconfdir}/alternatives/pip
+%{python_sitelib}/pip-%{version}-py%{python_version}.egg-info
+%{python_sitelib}/pip
 
 %changelog

++++++ pip-8.1.2-shipped-requests-cabundle.patch ++++++
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())

Reply via email to