forked from pool/python-pip
This commit is contained in:
parent
1e080e3705
commit
5901895627
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user