From 5901895627b129b0b8883b8073b06b744d32432ddbdeb41ce88bbb7ad6c33dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 20 Apr 2018 16:12:25 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=51 --- python-pip.spec | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 1aef44d..14eca28 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,27 +16,34 @@ # +%{?!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: 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 +Requires: ca-certificates +Requires: coreutils +Requires: python-setuptools +Requires: python-xml +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} @@ -44,15 +51,6 @@ 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 -BuildArch: noarch - %python_subpackages %description @@ -60,12 +58,11 @@ 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 src/pip/_vendor -name *.py -exec \ - sed -i "s|#!/usr/bin/env python||g" {} ";" # Fix non-executable script + 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 src/pip/_vendor/certifi/cacert.pem @@ -79,7 +76,7 @@ rm src/pip/_vendor/certifi/cacert.pem %if %{with test} %check -%python_exec setup.py test +%python_expand py.test-%{$python_version} %endif %pre @@ -104,8 +101,8 @@ PRIO=$(echo %{python_version} | tr -d .) %endif %files %{python_files} -%defattr(-,root,root,-) -%doc AUTHORS.txt NEWS.rst LICENSE.txt README.rst +%license LICENSE.txt +%doc AUTHORS.txt NEWS.rst README.rst %{_bindir}/pip %python2_only %{_bindir}/pip2 %python3_only %{_bindir}/pip3