|
|
|
@ -16,8 +16,9 @@
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: python-%{srcname}
|
|
|
|
|
Version: 9.0.1
|
|
|
|
|
Release: 9%{?dist}
|
|
|
|
|
# When updating, update the bundled libraries versions bellow!
|
|
|
|
|
Version: 9.0.3
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Summary: A tool for installing and managing Python packages
|
|
|
|
|
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
@ -43,6 +44,29 @@ Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch
|
|
|
|
|
# Issue upstream: https://github.com/pypa/pip/issues/4288
|
|
|
|
|
Patch1: emit-a-warning-when-running-with-root-privileges.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# WIP upstream patch https://github.com/pypa/pip/issues/5346
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1573755
|
|
|
|
|
Patch2: pip-nowarn-upgrade.patch
|
|
|
|
|
|
|
|
|
|
# Downstream only patch
|
|
|
|
|
# Users are upgrading pip9 to pip10 by various manners,
|
|
|
|
|
# one of them is `pip install --user --upgrade pip`.
|
|
|
|
|
# If they do that and they run `pip` or `pip3`, the one from /usr/bin is used.
|
|
|
|
|
# However that's the one from this RPM package (pip9) and the import in there
|
|
|
|
|
# fails (it tries to import from ~/.local, but pip10 is there with a bit
|
|
|
|
|
# different API).
|
|
|
|
|
# We add this patch as a dirty workaround to make /usr/bin/pip* work with
|
|
|
|
|
# both pip9 (from this RPM) and pip10 (from whatever).
|
|
|
|
|
# A proper fix is to put ~/.local/bin in front of /usr/bin in the PATH,
|
|
|
|
|
# however others are against that and we cannot change it for existing
|
|
|
|
|
# installs/user homes anyway.
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1569488
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1571650
|
|
|
|
|
# WARNING: /usr/bin/pip* are entrypoints, this cannot be applied in %%prep!
|
|
|
|
|
# %%patch10 doesn't work outside of %%prep, so we add it as a source
|
|
|
|
|
Source10: pip9-allow-pip10-import.patch
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Pip is a replacement for `easy_install
|
|
|
|
|
<http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
|
|
|
|
@ -54,23 +78,46 @@ easy_installable should be pip-installable as well.
|
|
|
|
|
Summary: A tool for installing and managing Python 2 packages
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python-setuptools
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
%if 0%{?with_tests}
|
|
|
|
|
BuildRequires: git
|
|
|
|
|
BuildRequires: bzr
|
|
|
|
|
BuildRequires: python-mock
|
|
|
|
|
BuildRequires: pytest
|
|
|
|
|
BuildRequires: python-pretend
|
|
|
|
|
BuildRequires: python-freezegun
|
|
|
|
|
BuildRequires: python-pytest-capturelog
|
|
|
|
|
BuildRequires: python-scripttest
|
|
|
|
|
BuildRequires: python-virtualenv
|
|
|
|
|
BuildRequires: python2-mock
|
|
|
|
|
BuildRequires: python2-pytest
|
|
|
|
|
BuildRequires: python2-pretend
|
|
|
|
|
BuildRequires: python2-freezegun
|
|
|
|
|
BuildRequires: python2-pytest-capturelog
|
|
|
|
|
BuildRequires: python2-scripttest
|
|
|
|
|
BuildRequires: python2-virtualenv
|
|
|
|
|
%endif
|
|
|
|
|
%if 0%{?build_wheel}
|
|
|
|
|
BuildRequires: python2-pip
|
|
|
|
|
BuildRequires: python-wheel
|
|
|
|
|
BuildRequires: python2-wheel
|
|
|
|
|
%endif
|
|
|
|
|
Requires: python-setuptools
|
|
|
|
|
Requires: python2-setuptools
|
|
|
|
|
|
|
|
|
|
# Virtual provides for the packages bundled by pip.
|
|
|
|
|
# You can find the versions in pip/_vendor/vendor.txt file.
|
|
|
|
|
# Don't forget to update this bellow for python3 as well.
|
|
|
|
|
Provides: bundled(python2dist(appdirs)) = 1.4.0
|
|
|
|
|
Provides: bundled(python2dist(cachecontrol)) = 0.11.7
|
|
|
|
|
Provides: bundled(python2dist(colorama)) = 0.3.7
|
|
|
|
|
Provides: bundled(python2dist(distlib)) = 0.2.4
|
|
|
|
|
Provides: bundled(python2dist(distro)) = 1.0.1
|
|
|
|
|
Provides: bundled(python2dist(html5lib)) = 1.0b10
|
|
|
|
|
Provides: bundled(python2dist(ipaddress) = 1.0.17
|
|
|
|
|
Provides: bundled(python2dist(lockfile)) = 0.12.2
|
|
|
|
|
Provides: bundled(python2dist(packaging)) = 16.8
|
|
|
|
|
Provides: bundled(python2dist(setuptools)) = 28.8.0
|
|
|
|
|
Provides: bundled(python2dist(progress)) = 1.2
|
|
|
|
|
Provides: bundled(python2dist(pyparsing)) = 2.1.10
|
|
|
|
|
Provides: bundled(python2dist(requests)) = 2.11.1
|
|
|
|
|
Provides: bundled(python2dist(retrying)) = 1.3.3
|
|
|
|
|
Provides: bundled(python2dist(six)) = 1.10.0
|
|
|
|
|
Provides: bundled(python2dist(webencodings)) = 0.5
|
|
|
|
|
|
|
|
|
|
# Bundled within the requests bundle
|
|
|
|
|
Provides: bundled(python2dist(chardet)) = 2.3.0
|
|
|
|
|
Provides: bundled(python2dist(urllib3)) = 1.16
|
|
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
|
|
|
|
|
|
|
%description -n python2-%{srcname}
|
|
|
|
@ -102,6 +149,30 @@ BuildRequires: python%{python3_pkgversion}-pip
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-wheel
|
|
|
|
|
%endif
|
|
|
|
|
Requires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
|
|
|
|
|
# Virtual provides for the packages bundled by pip.
|
|
|
|
|
# See the python2 list above for instructions.
|
|
|
|
|
Provides: bundled(python3dist(appdirs)) = 1.4.0
|
|
|
|
|
Provides: bundled(python3dist(cachecontrol)) = 0.11.7
|
|
|
|
|
Provides: bundled(python3dist(colorama)) = 0.3.7
|
|
|
|
|
Provides: bundled(python3dist(distlib)) = 0.2.4
|
|
|
|
|
Provides: bundled(python3dist(distro)) = 1.0.1
|
|
|
|
|
Provides: bundled(python3dist(html5lib)) = 1.0b10
|
|
|
|
|
Provides: bundled(python3dist(ipaddress) = 1.0.17
|
|
|
|
|
Provides: bundled(python3dist(lockfile)) = 0.12.2
|
|
|
|
|
Provides: bundled(python3dist(packaging)) = 16.8
|
|
|
|
|
Provides: bundled(python3dist(setuptools)) = 28.8.0
|
|
|
|
|
Provides: bundled(python3dist(progress)) = 1.2
|
|
|
|
|
Provides: bundled(python3dist(pyparsing)) = 2.1.10
|
|
|
|
|
Provides: bundled(python3dist(requests)) = 2.11.1
|
|
|
|
|
Provides: bundled(python3dist(retrying)) = 1.3.3
|
|
|
|
|
Provides: bundled(python3dist(six)) = 1.10.0
|
|
|
|
|
Provides: bundled(python3dist(webencodings)) = 0.5
|
|
|
|
|
|
|
|
|
|
# Bundled within the requests bundle
|
|
|
|
|
Provides: bundled(python3dist(chardet)) = 2.3.0
|
|
|
|
|
Provides: bundled(python3dist(urllib3)) = 1.16
|
|
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
|
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
@ -120,9 +191,13 @@ tar -xf %{SOURCE1}
|
|
|
|
|
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
|
|
|
|
|
sed -i '1d' pip/__init__.py
|
|
|
|
|
|
|
|
|
|
# Remove ordereddict as it is only required for python <= 2.6
|
|
|
|
|
rm pip/_vendor/ordereddict.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%if 0%{?build_wheel}
|
|
|
|
@ -158,6 +233,11 @@ rm %{buildroot}%{_bindir}/pip
|
|
|
|
|
%py2_install
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# before we ln -s anything, we apply Source10 patch to all pips:
|
|
|
|
|
for PIP in %{buildroot}%{_bindir}/pip*; do
|
|
|
|
|
patch -p1 $PIP < %{SOURCE10}
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{bashcompdir}
|
|
|
|
|
PYTHONPATH=%{buildroot}%{python_sitelib} \
|
|
|
|
|
%{buildroot}%{_bindir}/pip completion --bash \
|
|
|
|
@ -202,6 +282,12 @@ ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version}
|
|
|
|
|
ln -s ./pip-%{python2_version} %{buildroot}%{_bindir}/pip-2
|
|
|
|
|
ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3
|
|
|
|
|
|
|
|
|
|
# Make sure the INSTALLER is not pip, otherwise Patch2 won't work
|
|
|
|
|
# TODO Maybe we should make all our python packages have this?
|
|
|
|
|
echo rpm > %{buildroot}%{python2_sitelib}/pip-%{version}.dist-info/INSTALLER
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
echo rpm > %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/INSTALLER
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_tests}
|
|
|
|
|
%check
|
|
|
|
@ -244,6 +330,22 @@ py.test-%{python3_version} -m 'not network'
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri May 04 2018 Miro Hrončok <mhroncok@redhat.com> - 9.0.3-2
|
|
|
|
|
- Allow to import pip10's main from pip9's /usr/bin/pip
|
|
|
|
|
- Do not show the "new version of pip" warning outside of venv
|
|
|
|
|
Resolves: rhbz#1569488
|
|
|
|
|
Resolves: rhbz#1571650
|
|
|
|
|
Resolves: rhbz#1573755
|
|
|
|
|
|
|
|
|
|
* Thu Mar 29 2018 Charalampos Stratakis <cstratak@redhat.com> - 9.0.3-1
|
|
|
|
|
- Update to 9.0.3
|
|
|
|
|
|
|
|
|
|
* Mon Dec 04 2017 Charalampos Stratakis <cstratak@redhat.com> - 9.0.1-11
|
|
|
|
|
- Reintroduce the ipaddress module in the python3 subpackage.
|
|
|
|
|
|
|
|
|
|
* Mon Nov 20 2017 Charalampos Stratakis <cstratak@redhat.com> - 9.0.1-10
|
|
|
|
|
- Add virtual provides for the bundled libraries. (rhbz#1096912)
|
|
|
|
|
|
|
|
|
|
* Tue Mar 21 2017 Tomas Orsava <torsava@redhat.com> - 9.0.1-9
|
|
|
|
|
- Fix typo in the sudo pip warning
|
|
|
|
|
|
|
|
|
|