forked from pool/python-pip
Accepting request 460233 from devel:languages:python:singlespec
- 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 OBS-URL: https://build.opensuse.org/request/show/460233 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=46
This commit is contained in:
parent
848608d4e8
commit
8e50cef319
13
pip-8.1.2-shipped-requests-cabundle.patch
Normal file
13
pip-8.1.2-shipped-requests-cabundle.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
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())
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 23 15:31:57 UTC 2017 - jmatejek@suse.com
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Jan 8 14:53:21 UTC 2017 - michael@stroeder.com
|
Sun Jan 8 14:53:21 UTC 2017 - michael@stroeder.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pip
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -20,6 +20,7 @@
|
|||||||
# enable testing with a build conditional (off by default):
|
# enable testing with a build conditional (off by default):
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-pip
|
Name: python-pip
|
||||||
Version: 9.0.1
|
Version: 9.0.1
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -28,49 +29,55 @@ Summary: Pip installs packages. Python packages. An easy_install replacem
|
|||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Source: https://pypi.io/packages/source/p/pip/pip-%{version}.tar.gz
|
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
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: python-devel
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
# Test requirements:
|
# Test requirements:
|
||||||
BuildRequires: python-mock
|
BuildRequires: %{python_module mock}
|
||||||
BuildRequires: python-pytest
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: python-scripttest >= 1.3
|
BuildRequires: %{python_module scripttest >= 1.3}
|
||||||
BuildRequires: python-virtualenv >= 1.10
|
BuildRequires: %{python_module virtualenv >= 1.10}
|
||||||
%endif
|
%endif
|
||||||
|
Requires: ca-certificates
|
||||||
Requires: coreutils
|
Requires: coreutils
|
||||||
Requires: python-setuptools
|
Requires: python-setuptools
|
||||||
Requires: python-xml
|
Requires: python-xml
|
||||||
|
Recommends: ca-certificates-mozilla
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): 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
|
BuildArch: noarch
|
||||||
%endif
|
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Pip is a replacement for easy_install. It uses mostly the same techniques for
|
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
|
finding packages, so packages that were made easy_installable should be
|
||||||
pip-installable as well.
|
pip-installable as well.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pip-%{version}
|
%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
|
%build
|
||||||
python setup.py build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
%python_install
|
||||||
rm %{buildroot}%{_bindir}/pip
|
%prepare_alternative pip
|
||||||
ln -s %{_bindir}/pip%{py_ver} %{buildroot}%{_bindir}/pip
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
python setup.py test
|
%python_exec setup.py test
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
@ -79,23 +86,34 @@ python setup.py test
|
|||||||
[ -h %{_bindir}/pip ] || rm -f %{_bindir}/pip
|
[ -h %{_bindir}/pip ] || rm -f %{_bindir}/pip
|
||||||
|
|
||||||
%post
|
%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 .)
|
||||||
%preun
|
%ifpypy3
|
||||||
if [ $1 -eq 0 ] ; then
|
%install_alternative pip %{_bindir}/pip-%{pypy3_bin_suffix} $PRIO
|
||||||
update-alternatives --remove pip %{_bindir}/pip%{py_ver}
|
%else
|
||||||
fi
|
%install_alternative pip %{_bindir}/pip%{python_version} $PRIO
|
||||||
|
|
||||||
%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
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%ifpypy3
|
||||||
|
%uninstall_alternative pip %{_bindir}/pip-%{pypy3_bin_suffix}
|
||||||
|
%else
|
||||||
|
%uninstall_alternative pip %{_bindir}/pip%{python_version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc AUTHORS.txt CHANGES.txt LICENSE.txt README.rst
|
||||||
|
%{_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
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user