Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
20e111c7d9 | ||
|
c7003b76d9 | ||
|
8540e6a72a | ||
|
c9ef3c929b | ||
|
3e4dd1e249 | ||
|
f5670068cb | ||
|
4fd076bf4d | ||
|
cfdddae669 | ||
|
b71b777d9e | ||
|
300039ebf8 |
168
7873.patch
Normal file
168
7873.patch
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
From b64c5c433af2edc38f9b69c9e331653be16085a0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Hrnciar <thrnciar@redhat.com>
|
||||||
|
Date: Mon, 20 Apr 2020 14:14:05 +0200
|
||||||
|
Subject: [PATCH 1/2] Backport of necessary changes from PR #6770, needed for
|
||||||
|
backport of PR #7872
|
||||||
|
|
||||||
|
https://github.com/pypa/pip/pull/6770
|
||||||
|
---
|
||||||
|
src/pip/_internal/download.py | 13 ++++++++++++-
|
||||||
|
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/pip/_internal/download.py b/src/pip/_internal/download.py
|
||||||
|
index 2683cf08..d5a94350 100644
|
||||||
|
--- a/src/pip/_internal/download.py
|
||||||
|
+++ b/src/pip/_internal/download.py
|
||||||
|
@@ -773,9 +773,20 @@ def unpack_file_url(
|
||||||
|
|
||||||
|
# If it's a url to a local directory
|
||||||
|
if is_dir_url(link):
|
||||||
|
+
|
||||||
|
+ def ignore(d, names):
|
||||||
|
+ # Pulling in those directories can potentially be very slow,
|
||||||
|
+ # exclude the following directories if they appear in the top
|
||||||
|
+ # level dir (and only it).
|
||||||
|
+ # See discussion at https://github.com/pypa/pip/pull/6770
|
||||||
|
+ return ['.tox', '.nox'] if d == link_path else []
|
||||||
|
if os.path.isdir(location):
|
||||||
|
rmtree(location)
|
||||||
|
- shutil.copytree(link_path, location, symlinks=True)
|
||||||
|
+ shutil.copytree(link_path,
|
||||||
|
+ location,
|
||||||
|
+ symlinks=True,
|
||||||
|
+ ignore=ignore)
|
||||||
|
+
|
||||||
|
if download_dir:
|
||||||
|
logger.info('Link is a directory, ignoring download_dir')
|
||||||
|
return
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
|
|
||||||
|
From 3ce83f36f5f33a76ff6a0451cd7001dc00971ef2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Hrnciar <thrnciar@redhat.com>
|
||||||
|
Date: Mon, 20 Apr 2020 14:46:49 +0200
|
||||||
|
Subject: [PATCH 2/2] Prevent infinite recursion with pip wheel with $TMPDIR in
|
||||||
|
$PWD
|
||||||
|
|
||||||
|
During a build of extension module within `pip wheel` the source directory is
|
||||||
|
recursively copied in a temporary directory.
|
||||||
|
|
||||||
|
See https://github.com/pypa/pip/issues/7555
|
||||||
|
|
||||||
|
When the temporary directory is inside the source directory
|
||||||
|
(for example by setting `TMPDIR=$PWD/tmp`) this caused an infinite recursion
|
||||||
|
that ended in:
|
||||||
|
|
||||||
|
[Errno 36] File name too long
|
||||||
|
|
||||||
|
We prevent that buy never copying the target to the target in _copy_source_tree.
|
||||||
|
|
||||||
|
Fixes https://github.com/pypa/pip/issues/7872
|
||||||
|
|
||||||
|
Avoid a test dependency on a C compiler, skip the test on Windows
|
||||||
|
---
|
||||||
|
news/7872.bugfix | 1 +
|
||||||
|
src/pip/_internal/download.py | 23 ++++++++++++++++++-----
|
||||||
|
tests/data/src/extension/extension.c | 0
|
||||||
|
tests/data/src/extension/setup.py | 4 ++++
|
||||||
|
tests/functional/test_wheel.py | 18 ++++++++++++++++++
|
||||||
|
5 files changed, 41 insertions(+), 5 deletions(-)
|
||||||
|
create mode 100644 news/7872.bugfix
|
||||||
|
create mode 100644 tests/data/src/extension/extension.c
|
||||||
|
create mode 100644 tests/data/src/extension/setup.py
|
||||||
|
|
||||||
|
diff --git a/news/7872.bugfix b/news/7872.bugfix
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..3550d573
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/news/7872.bugfix
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+Prevent an infinite recursion with ``pip wheel`` when ``$TMPDIR`` is within the source directory.
|
||||||
|
diff --git a/src/pip/_internal/download.py b/src/pip/_internal/download.py
|
||||||
|
index d5a94350..f589d42f 100644
|
||||||
|
--- a/src/pip/_internal/download.py
|
||||||
|
+++ b/src/pip/_internal/download.py
|
||||||
|
@@ -773,13 +773,26 @@ def unpack_file_url(
|
||||||
|
|
||||||
|
# If it's a url to a local directory
|
||||||
|
if is_dir_url(link):
|
||||||
|
+ target_abspath = os.path.abspath(location)
|
||||||
|
+ target_basename = os.path.basename(target_abspath)
|
||||||
|
+ target_dirname = os.path.dirname(target_abspath)
|
||||||
|
|
||||||
|
def ignore(d, names):
|
||||||
|
- # Pulling in those directories can potentially be very slow,
|
||||||
|
- # exclude the following directories if they appear in the top
|
||||||
|
- # level dir (and only it).
|
||||||
|
- # See discussion at https://github.com/pypa/pip/pull/6770
|
||||||
|
- return ['.tox', '.nox'] if d == link_path else []
|
||||||
|
+ # type: (str, List[str]) -> List[str]
|
||||||
|
+ skipped = [] # type: List[str]
|
||||||
|
+ if d == link_path:
|
||||||
|
+ # Pulling in those directories can potentially be very slow,
|
||||||
|
+ # exclude the following directories if they appear in the top
|
||||||
|
+ # level dir (and only it).
|
||||||
|
+ # See discussion at https://github.com/pypa/pip/pull/6770
|
||||||
|
+ skipped += ['.tox', '.nox']
|
||||||
|
+ if os.path.abspath(d) == target_dirname:
|
||||||
|
+ # Prevent an infinite recursion if the target is in source.
|
||||||
|
+ # This can happen when TMPDIR is set to ${PWD}/...
|
||||||
|
+ # and we copy PWD to TMPDIR.
|
||||||
|
+ skipped += [target_basename]
|
||||||
|
+ return skipped
|
||||||
|
+
|
||||||
|
if os.path.isdir(location):
|
||||||
|
rmtree(location)
|
||||||
|
shutil.copytree(link_path,
|
||||||
|
diff --git a/tests/data/src/extension/extension.c b/tests/data/src/extension/extension.c
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..e69de29b
|
||||||
|
diff --git a/tests/data/src/extension/setup.py b/tests/data/src/extension/setup.py
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..b26302b0
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/data/src/extension/setup.py
|
||||||
|
@@ -0,0 +1,4 @@
|
||||||
|
+from setuptools import Extension, setup
|
||||||
|
+
|
||||||
|
+module = Extension('extension', sources=['extension.c'])
|
||||||
|
+setup(name='extension', version='0.0.1', ext_modules = [module])
|
||||||
|
diff --git a/tests/functional/test_wheel.py b/tests/functional/test_wheel.py
|
||||||
|
index f67720f1..6cb87a4c 100644
|
||||||
|
--- a/tests/functional/test_wheel.py
|
||||||
|
+++ b/tests/functional/test_wheel.py
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
"""'pip wheel' tests"""
|
||||||
|
import os
|
||||||
|
+import sys
|
||||||
|
from os.path import exists
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
@@ -218,6 +219,23 @@ def test_pip_wheel_with_user_set_in_config(script, data, common_wheels):
|
||||||
|
)
|
||||||
|
assert "Successfully built withpyproject" in result.stdout, result.stdout
|
||||||
|
|
||||||
|
+@pytest.mark.skipif(sys.platform.startswith('win'),
|
||||||
|
+ reason='The empty extension module does not work on Win')
|
||||||
|
+def test_pip_wheel_ext_module_with_tmpdir_inside(script, data, common_wheels):
|
||||||
|
+ tmpdir = data.src / 'extension/tmp'
|
||||||
|
+ tmpdir.mkdir()
|
||||||
|
+ script.environ['TMPDIR'] = str(tmpdir)
|
||||||
|
+
|
||||||
|
+ # To avoid a test dependency on a C compiler, we set the env vars to "noop"
|
||||||
|
+ # The .c source is empty anyway
|
||||||
|
+ script.environ['CC'] = script.environ['LDSHARED'] = str('true')
|
||||||
|
+
|
||||||
|
+ result = script.pip(
|
||||||
|
+ 'wheel', data.src / 'extension',
|
||||||
|
+ '--no-index', '-f', common_wheels
|
||||||
|
+ )
|
||||||
|
+ assert "Successfully built extension" in result.stdout, result.stdout
|
||||||
|
+
|
||||||
|
|
||||||
|
@pytest.mark.network
|
||||||
|
def test_pep517_wheels_are_not_confused_with_other_files(script, tmpdir, data):
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
--- /usr/bin/pip3 2018-03-29 15:22:13.000000000 +0200
|
--- /usr/bin/pip3 2018-03-29 15:22:13.000000000 +0200
|
||||||
+++ pip3 2018-05-04 11:49:08.098821010 +0200
|
+++ pip3 2018-05-04 11:49:08.098821010 +0200
|
||||||
@@ -4,7 +4,12 @@
|
@@ -4,7 +4,16 @@
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -11,6 +11,10 @@
|
|||||||
+ # user has most probably downgraded pip in their home
|
+ # user has most probably downgraded pip in their home
|
||||||
+ # so let them run it anyway until ~/.local/bin makes it in front of the PATH
|
+ # so let them run it anyway until ~/.local/bin makes it in front of the PATH
|
||||||
+ from pip import main
|
+ from pip import main
|
||||||
|
+else:
|
||||||
|
+ # user might also upgraded pip...
|
||||||
|
+ if hasattr(main, 'main'):
|
||||||
|
+ main = main.main
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
15
python-pip.rpmlintrc
Normal file
15
python-pip.rpmlintrc
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# This is just temporary, when upstream merges PRs it can be removed
|
||||||
|
# https://github.com/pypa/pip/pull/7959
|
||||||
|
# https://github.com/ActiveState/appdirs/pull/144
|
||||||
|
# https://github.com/psf/requests/pull/5410
|
||||||
|
# https://github.com/chardet/chardet/pull/192
|
||||||
|
addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_internal/__init__.py\b')
|
||||||
|
addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/appdirs.py\b')
|
||||||
|
addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/requests/certs.py\b')
|
||||||
|
addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/chardet/cli/chardetect.py\b')
|
||||||
|
|
||||||
|
# We ship README with the main package but not with the wheel
|
||||||
|
addFilter(r'python-pip-wheel.noarch: W: no-documentation')
|
||||||
|
|
||||||
|
# SPELLING ERRORS
|
||||||
|
addFilter(r'W: spelling-error .* venv')
|
@ -23,7 +23,7 @@ Name: python-%{srcname}
|
|||||||
# When updating, update the bundled libraries versions bellow!
|
# When updating, update the bundled libraries versions bellow!
|
||||||
# You can use vendor_meta.sh in the dist git repo
|
# You can use vendor_meta.sh in the dist git repo
|
||||||
Version: 19.1.1
|
Version: 19.1.1
|
||||||
Release: 4%{?dist}
|
Release: 8%{?dist}
|
||||||
Summary: A tool for installing and managing Python packages
|
Summary: A tool for installing and managing Python packages
|
||||||
|
|
||||||
# We bundle a lot of libraries with pip, which itself is under MIT license.
|
# We bundle a lot of libraries with pip, which itself is under MIT license.
|
||||||
@ -50,12 +50,13 @@ Summary: A tool for installing and managing Python packages
|
|||||||
# idna: BSD
|
# idna: BSD
|
||||||
# urllib3: MIT
|
# urllib3: MIT
|
||||||
# certifi: MPLv2.0
|
# certifi: MPLv2.0
|
||||||
|
# rfc3986: ASL 2.0
|
||||||
# setuptools: MIT
|
# setuptools: MIT
|
||||||
# webencodings: BSD
|
# webencodings: BSD
|
||||||
|
|
||||||
License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD)
|
License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD)
|
||||||
URL: http://www.pip-installer.org
|
URL: https://pip.pypa.io/
|
||||||
Source0: %pypi_source
|
Source0: https://github.com/pypa/pip/archive/%{version}/%{srcname}-%{version}.tar.gz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -67,17 +68,10 @@ BuildRequires: python-setuptools-wheel
|
|||||||
BuildRequires: python-wheel-wheel
|
BuildRequires: python-wheel-wheel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# to get tests:
|
|
||||||
# git clone https://github.com/pypa/pip && cd pip
|
|
||||||
# git checkout $VERSION && tar -czvf ../pip-$VERSION-tests.tar.gz tests/
|
|
||||||
%if %{with tests}
|
|
||||||
Source1: pip-%{version}-tests.tar.gz
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Themes required to build the docs.
|
# Themes required to build the docs.
|
||||||
%if %{with doc}
|
%if %{with doc}
|
||||||
Source2: https://github.com/pypa/pypa-docs-theme/archive/%{pypa_theme_commit_hash}.tar.gz
|
Source1: https://github.com/pypa/pypa-docs-theme/archive/%{pypa_theme_commit_hash}.tar.gz
|
||||||
Source3: https://github.com/python/python-docs-theme/archive/2018.2.tar.gz
|
Source2: https://github.com/python/python-docs-theme/archive/2018.2.tar.gz
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Patch until the following issue gets implemented upstream:
|
# Patch until the following issue gets implemented upstream:
|
||||||
@ -105,23 +99,47 @@ Patch4: dummy-certifi.patch
|
|||||||
# Once we no longer ship or test python2-pip, remove this patch
|
# Once we no longer ship or test python2-pip, remove this patch
|
||||||
Patch5: skip-virtualenv-tests.patch
|
Patch5: skip-virtualenv-tests.patch
|
||||||
|
|
||||||
|
# Make pip compatible with Python 3.9, backported from pip 19.2+
|
||||||
|
# https://github.com/pypa/pip/pull/6728
|
||||||
|
Patch6: python39.patch
|
||||||
|
|
||||||
|
# Upgrade urllib3 to 1.25.3
|
||||||
|
# This bundles rfc3986
|
||||||
|
# https://github.com/pypa/pip/commit/0d620c4a03a8b3765ec45785299244e1a494d750
|
||||||
|
# CVE-2019-11324: Certification mishandle when error should be thrown
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1774595
|
||||||
|
# CVE-2019-11236: CRLF injection due to not encoding the '\r\n' sequence
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1775363
|
||||||
|
Patch7: urllib3-1.25.3.patch
|
||||||
|
|
||||||
|
# Upgrade requests to 2.22.0 (needed for urllib3 1.25.3)
|
||||||
|
# https://github.com/pypa/pip/commit/8e8d28dd8ecc9226ea4e0f75d54151df90f4d78e
|
||||||
|
Patch8: requests-2.22.0.patch
|
||||||
|
|
||||||
|
# Allow setting $TMPDIR to $PWD/... during pip wheel
|
||||||
|
# This is needed to have proper debugsource packages with pyproject-rpm-macros
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1806625
|
||||||
|
# Backported from https://github.com/pypa/pip/pull/7873
|
||||||
|
Patch9: 7873.patch
|
||||||
|
|
||||||
# Downstream only patch
|
# Downstream only patch
|
||||||
# Users might have local installations of pip from using
|
# Users might have local installations of pip from using
|
||||||
# `pip install --user --upgrade pip` on older versions.
|
# `pip install --user --upgrade pip` on older/newer versions.
|
||||||
# If they do that and they run `pip` or `pip3`, the one from /usr/bin is used.
|
# 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 (pip10+) and the import in there
|
# However that's the one from this RPM package and the import in there might
|
||||||
# fails (it tries to import from ~/.local, but older pip is there with a bit
|
# fail (it tries to import from ~/.local, but older or newer pip is there with
|
||||||
# different API).
|
# a bit different API).
|
||||||
# We add this patch as a dirty workaround to make /usr/bin/pip* work with
|
# We add this patch as a dirty workaround to make /usr/bin/pip* work with
|
||||||
# both pip10+ (from this RPM) and older pip (from whatever).
|
# both pip10+ (from this RPM) and older or newer (19.3+) pip (from whatever).
|
||||||
# A proper fix is to put ~/.local/bin in front of /usr/bin in the PATH,
|
# 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
|
# however others are against that and we cannot change it for existing
|
||||||
# installs/user homes anyway.
|
# installs/user homes anyway.
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1569488
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1569488
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1571650
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1571650
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1767212
|
||||||
# WARNING: /usr/bin/pip* are entrypoints, this cannot be applied in %%prep!
|
# 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
|
# %%patch10 doesn't work outside of %%prep, so we add it as a source
|
||||||
Source10: pip-allow-older-versions.patch
|
Source10: pip-allow-different-versions.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
pip is a package management system used to install and manage software packages
|
pip is a package management system used to install and manage software packages
|
||||||
@ -151,11 +169,12 @@ Provides: bundled(python%{1}dist(pep517)) = 0.5.0
|
|||||||
Provides: bundled(python%{1}dist(progress)) = 1.5
|
Provides: bundled(python%{1}dist(progress)) = 1.5
|
||||||
Provides: bundled(python%{1}dist(pyparsing)) = 2.4.0
|
Provides: bundled(python%{1}dist(pyparsing)) = 2.4.0
|
||||||
Provides: bundled(python%{1}dist(pytoml)) = 0.1.20
|
Provides: bundled(python%{1}dist(pytoml)) = 0.1.20
|
||||||
Provides: bundled(python%{1}dist(requests)) = 2.21.0
|
Provides: bundled(python%{1}dist(requests)) = 2.22.0
|
||||||
Provides: bundled(python%{1}dist(retrying)) = 1.3.3
|
Provides: bundled(python%{1}dist(retrying)) = 1.3.3
|
||||||
Provides: bundled(python%{1}dist(setuptools)) = 41.0.1
|
Provides: bundled(python%{1}dist(setuptools)) = 41.0.1
|
||||||
Provides: bundled(python%{1}dist(six)) = 1.12.0
|
Provides: bundled(python%{1}dist(six)) = 1.12.0
|
||||||
Provides: bundled(python%{1}dist(urllib3)) = 1.24.1
|
Provides: bundled(python%{1}dist(urllib3)) = 1.25.3
|
||||||
|
Provides: bundled(python%{1}dist(rfc3986)) = 1.3.2
|
||||||
Provides: bundled(python%{1}dist(webencodings)) = 0.5.1
|
Provides: bundled(python%{1}dist(webencodings)) = 0.5.1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,14 +302,12 @@ A Python wheel of pip to use with venv.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{version}
|
%setup -q -n %{srcname}-%{version}
|
||||||
%if %{with tests}
|
|
||||||
tar -xf %{SOURCE1}
|
|
||||||
%endif
|
|
||||||
%if %{with doc}
|
%if %{with doc}
|
||||||
pushd docs/html
|
pushd docs/html
|
||||||
tar -xf %{SOURCE2}
|
tar -xf %{SOURCE1}
|
||||||
mv pypa-docs-theme-%{pypa_theme_commit_hash} pypa
|
mv pypa-docs-theme-%{pypa_theme_commit_hash} pypa
|
||||||
tar -xf %{SOURCE3}
|
tar -xf %{SOURCE2}
|
||||||
mv python-docs-theme-2018.2 python-docs-theme
|
mv python-docs-theme-2018.2 python-docs-theme
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
@ -301,15 +318,16 @@ popd
|
|||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
|
%patch9 -p1
|
||||||
|
|
||||||
# this goes together with patch4
|
# this goes together with patch4
|
||||||
rm src/pip/_vendor/certifi/*.pem
|
rm src/pip/_vendor/certifi/*.pem
|
||||||
sed -i '/\.pem$/d' src/pip.egg-info/SOURCES.txt
|
|
||||||
|
|
||||||
%if %{with tests}
|
|
||||||
# tests expect wheels in here
|
# tests expect wheels in here
|
||||||
ln -s %{python_wheeldir} tests/data/common_wheels
|
ln -s %{python_wheeldir} tests/data/common_wheels
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -328,7 +346,7 @@ export PYTHONPATH=./src/
|
|||||||
# from tox.ini
|
# from tox.ini
|
||||||
sphinx-build-3 -b html docs/html docs/build/html
|
sphinx-build-3 -b html docs/html docs/build/html
|
||||||
sphinx-build-3 -b man docs/man docs/build/man -c docs/html
|
sphinx-build-3 -b man docs/man docs/build/man -c docs/html
|
||||||
rm docs/build/html/.buildinfo
|
rm -rf docs/build/html/{.doctrees,.buildinfo}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
@ -359,7 +377,9 @@ install -pm0644 $MAN %{buildroot}%{_mandir}/man1/$MAN
|
|||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip2}
|
install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip2}
|
||||||
%endif
|
%endif
|
||||||
install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip3}
|
for pip in "pip3" "pip-3" "pip%{python3_version}" "pip-%{python3_version}"; do
|
||||||
|
echo ".so $MAN" > %{buildroot}%{_mandir}/man1/${MAN/pip/$pip}
|
||||||
|
done
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
%endif # with doc
|
%endif # with doc
|
||||||
@ -493,6 +513,7 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip
|
|||||||
%if %{with doc}
|
%if %{with doc}
|
||||||
%{_mandir}/man1/pip.*
|
%{_mandir}/man1/pip.*
|
||||||
%{_mandir}/man1/pip3.*
|
%{_mandir}/man1/pip3.*
|
||||||
|
%{_mandir}/man1/pip-*
|
||||||
%endif
|
%endif
|
||||||
%{_bindir}/pip
|
%{_bindir}/pip
|
||||||
%{_bindir}/pip3
|
%{_bindir}/pip3
|
||||||
@ -523,6 +544,20 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 10 2020 Miro Hrončok <mhroncok@redhat.com> - 19.1.1-8
|
||||||
|
- Allow setting $TMPDIR to $PWD/... during pip wheel (#1806625)
|
||||||
|
|
||||||
|
* Thu Jan 02 2020 Miro Hrončok <mhroncok@redhat.com> - 19.1.1-7
|
||||||
|
- Upgrade urllib3 to 1.25.3, requests to 2.22.0
|
||||||
|
- Fix urllib3 CVE-2019-11324 (#1774595)
|
||||||
|
- Fix urllib3 CVE-2019-11236 (#1775363)
|
||||||
|
|
||||||
|
* Mon Nov 25 2019 Miro Hrončok <mhroncok@redhat.com> - 19.1.1-6
|
||||||
|
- Make python-pip-wheel work with Python 3.9
|
||||||
|
|
||||||
|
* Mon Nov 11 2019 Miro Hrončok <mhroncok@redhat.com> - 19.1.1-5
|
||||||
|
- Make /usr/bin/pip(2|3) work with user-installed pip 19.3+ (#1767212)
|
||||||
|
|
||||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 19.1.1-4
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 19.1.1-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
45
python39.patch
Normal file
45
python39.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
From ef7ca1472c1fdd085cffb8183b7ce8abbe9e2800 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chih-Hsuan Yen <yan12125@gmail.com>
|
||||||
|
Date: Thu, 18 Jul 2019 12:45:15 +0800
|
||||||
|
Subject: [PATCH] Add an html5lib patch for Python 3.9 compatibility
|
||||||
|
|
||||||
|
The patch is adapted from https://github.com/html5lib/html5lib-python/commit/4f9235752cea29c5a31721440578b430823a1e69
|
||||||
|
|
||||||
|
Closes https://github.com/pypa/pip/issues/6407
|
||||||
|
Closes https://github.com/pypa/pip/issues/6237
|
||||||
|
---
|
||||||
|
src/pip/_vendor/html5lib/_trie/_base.py | 5 +++-
|
||||||
|
src/pip/_vendor/html5lib/treebuilders/dom.py | 5 +++-
|
||||||
|
4 files changed, 40 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/pip/_vendor/html5lib/_trie/_base.py b/src/pip/_vendor/html5lib/_trie/_base.py
|
||||||
|
index a1158bbbf..6b71975f0 100644
|
||||||
|
--- a/src/pip/_vendor/html5lib/_trie/_base.py
|
||||||
|
+++ b/src/pip/_vendor/html5lib/_trie/_base.py
|
||||||
|
@@ -1,6 +1,9 @@
|
||||||
|
from __future__ import absolute_import, division, unicode_literals
|
||||||
|
|
||||||
|
-from collections import Mapping
|
||||||
|
+try:
|
||||||
|
+ from collections.abc import Mapping
|
||||||
|
+except ImportError: # Python 2.7
|
||||||
|
+ from collections import Mapping
|
||||||
|
|
||||||
|
|
||||||
|
class Trie(Mapping):
|
||||||
|
diff --git a/src/pip/_vendor/html5lib/treebuilders/dom.py b/src/pip/_vendor/html5lib/treebuilders/dom.py
|
||||||
|
index dcfac220b..d8b530046 100644
|
||||||
|
--- a/src/pip/_vendor/html5lib/treebuilders/dom.py
|
||||||
|
+++ b/src/pip/_vendor/html5lib/treebuilders/dom.py
|
||||||
|
@@ -1,7 +1,10 @@
|
||||||
|
from __future__ import absolute_import, division, unicode_literals
|
||||||
|
|
||||||
|
|
||||||
|
-from collections import MutableMapping
|
||||||
|
+try:
|
||||||
|
+ from collections.abc import MutableMapping
|
||||||
|
+except ImportError: # Python 2.7
|
||||||
|
+ from collections import MutableMapping
|
||||||
|
from xml.dom import minidom, Node
|
||||||
|
import weakref
|
||||||
|
|
91
requests-2.22.0.patch
Normal file
91
requests-2.22.0.patch
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
From 8e8d28dd8ecc9226ea4e0f75d54151df90f4d78e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pradyun Gedam <pradyunsg@gmail.com>
|
||||||
|
Date: Sat, 20 Jul 2019 09:31:48 +0530
|
||||||
|
Subject: [PATCH] Upgrade requests to 2.22.0
|
||||||
|
|
||||||
|
---
|
||||||
|
news/requests.vendor | 1 +
|
||||||
|
src/pip/_vendor/requests/__init__.py | 4 ++--
|
||||||
|
src/pip/_vendor/requests/__version__.py | 6 +++---
|
||||||
|
src/pip/_vendor/requests/api.py | 4 ++--
|
||||||
|
src/pip/_vendor/vendor.txt | 1 +
|
||||||
|
5 files changed, 9 insertions(+), 7 deletions(-)
|
||||||
|
create mode 100644 news/requests.vendor
|
||||||
|
|
||||||
|
diff --git a/news/requests.vendor b/news/requests.vendor
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..aac729b0e1
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/news/requests.vendor
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+Upgrade requests to 2.22.0
|
||||||
|
diff --git a/src/pip/_vendor/requests/__init__.py b/src/pip/_vendor/requests/__init__.py
|
||||||
|
index 80c4ce1d21..1d30e3e063 100644
|
||||||
|
--- a/src/pip/_vendor/requests/__init__.py
|
||||||
|
+++ b/src/pip/_vendor/requests/__init__.py
|
||||||
|
@@ -57,10 +57,10 @@ def check_compatibility(urllib3_version, chardet_version):
|
||||||
|
# Check urllib3 for compatibility.
|
||||||
|
major, minor, patch = urllib3_version # noqa: F811
|
||||||
|
major, minor, patch = int(major), int(minor), int(patch)
|
||||||
|
- # urllib3 >= 1.21.1, <= 1.24
|
||||||
|
+ # urllib3 >= 1.21.1, <= 1.25
|
||||||
|
assert major == 1
|
||||||
|
assert minor >= 21
|
||||||
|
- assert minor <= 24
|
||||||
|
+ assert minor <= 25
|
||||||
|
|
||||||
|
# Check chardet for compatibility.
|
||||||
|
major, minor, patch = chardet_version.split('.')[:3]
|
||||||
|
diff --git a/src/pip/_vendor/requests/__version__.py b/src/pip/_vendor/requests/__version__.py
|
||||||
|
index f5b5d03671..9844f740ab 100644
|
||||||
|
--- a/src/pip/_vendor/requests/__version__.py
|
||||||
|
+++ b/src/pip/_vendor/requests/__version__.py
|
||||||
|
@@ -5,10 +5,10 @@
|
||||||
|
__title__ = 'requests'
|
||||||
|
__description__ = 'Python HTTP for Humans.'
|
||||||
|
__url__ = 'http://python-requests.org'
|
||||||
|
-__version__ = '2.21.0'
|
||||||
|
-__build__ = 0x022100
|
||||||
|
+__version__ = '2.22.0'
|
||||||
|
+__build__ = 0x022200
|
||||||
|
__author__ = 'Kenneth Reitz'
|
||||||
|
__author_email__ = 'me@kennethreitz.org'
|
||||||
|
__license__ = 'Apache 2.0'
|
||||||
|
-__copyright__ = 'Copyright 2018 Kenneth Reitz'
|
||||||
|
+__copyright__ = 'Copyright 2019 Kenneth Reitz'
|
||||||
|
__cake__ = u'\u2728 \U0001f370 \u2728'
|
||||||
|
diff --git a/src/pip/_vendor/requests/api.py b/src/pip/_vendor/requests/api.py
|
||||||
|
index abada96d46..ef71d0759e 100644
|
||||||
|
--- a/src/pip/_vendor/requests/api.py
|
||||||
|
+++ b/src/pip/_vendor/requests/api.py
|
||||||
|
@@ -19,7 +19,7 @@ def request(method, url, **kwargs):
|
||||||
|
:param method: method for the new :class:`Request` object.
|
||||||
|
:param url: URL for the new :class:`Request` object.
|
||||||
|
:param params: (optional) Dictionary, list of tuples or bytes to send
|
||||||
|
- in the body of the :class:`Request`.
|
||||||
|
+ in the query string for the :class:`Request`.
|
||||||
|
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
|
||||||
|
object to send in the body of the :class:`Request`.
|
||||||
|
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
|
||||||
|
@@ -65,7 +65,7 @@ def get(url, params=None, **kwargs):
|
||||||
|
|
||||||
|
:param url: URL for the new :class:`Request` object.
|
||||||
|
:param params: (optional) Dictionary, list of tuples or bytes to send
|
||||||
|
- in the body of the :class:`Request`.
|
||||||
|
+ in the query string for the :class:`Request`.
|
||||||
|
:param \*\*kwargs: Optional arguments that ``request`` takes.
|
||||||
|
:return: :class:`Response <Response>` object
|
||||||
|
:rtype: requests.Response
|
||||||
|
diff --git a/src/pip/_vendor/vendor.txt b/src/pip/_vendor/vendor.txt
|
||||||
|
index bcf579515e..e5542fbc5e 100644
|
||||||
|
--- a/src/pip/_vendor/vendor.txt
|
||||||
|
+++ b/src/pip/_vendor/vendor.txt
|
||||||
|
@@ -12,7 +12,7 @@ pep517==0.5.0
|
||||||
|
progress==1.5
|
||||||
|
pyparsing==2.4.0
|
||||||
|
pytoml==0.1.20
|
||||||
|
-requests==2.21.0
|
||||||
|
+requests==2.22.0
|
||||||
|
certifi==2019.3.9
|
||||||
|
chardet==3.0.4
|
||||||
|
idna==2.8
|
3
sources
3
sources
@ -1,4 +1,3 @@
|
|||||||
SHA512 (pip-19.1.1.tar.gz) = b35598fc6077af44d69f32bc3bc4b28630b1761a31b6b814c59069adbea98bdd68071471bf5ebd28551aae8e970b882200938f6751135f246dc8228f799604a3
|
SHA512 (pip-19.1.1.tar.gz) = 91cd07118d2f7a39b0ecc5f26ae18de3778ebdde90a40f5fa8cf543dfc8e006647ee2f0f6574db1e102e421962db0d725b0ce7ac75f2bb9591cf4754604c9b1a
|
||||||
SHA512 (pip-19.1.1-tests.tar.gz) = e67d49c87dc06ef1c45733623280571089307f2e4151c6e189d2f286c154c59d0c83e6a252ac5bd677ece0ce03294f909aa9eed128f0795f062224fcbf21c5d7
|
|
||||||
SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409
|
SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409
|
||||||
SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d
|
SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
repositories:
|
repositories:
|
||||||
- repo: "https://src.fedoraproject.org/tests/python.git"
|
- repo: "https://src.fedoraproject.org/tests/python.git"
|
||||||
dest: "python"
|
dest: "python"
|
||||||
|
- repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git"
|
||||||
|
dest: "pyproject-rpm-macros"
|
||||||
tests:
|
tests:
|
||||||
- smoke34:
|
- smoke34:
|
||||||
dir: python/smoke
|
dir: python/smoke
|
||||||
@ -43,6 +45,18 @@
|
|||||||
run: VERSION=3.8 METHOD=virtualenv ./venv.sh
|
run: VERSION=3.8 METHOD=virtualenv ./venv.sh
|
||||||
- pipenv:
|
- pipenv:
|
||||||
run: pipenv --three && pipenv install six
|
run: pipenv --three && pipenv install six
|
||||||
|
- pyproject_pytest:
|
||||||
|
dir: pyproject-rpm-macros/tests
|
||||||
|
run: ./mocktest.sh python-pytest
|
||||||
|
- pyproject_entrypoints:
|
||||||
|
dir: pyproject-rpm-macros/tests
|
||||||
|
run: ./mocktest.sh python-entrypoints
|
||||||
|
- pyproject_pluggy:
|
||||||
|
dir: pyproject-rpm-macros/tests
|
||||||
|
run: ./mocktest.sh python-pluggy
|
||||||
|
- pyproject_clikit:
|
||||||
|
dir: pyproject-rpm-macros/tests
|
||||||
|
run: ./mocktest.sh python-clikit
|
||||||
required_packages:
|
required_packages:
|
||||||
- gcc
|
- gcc
|
||||||
- virtualenv
|
- virtualenv
|
||||||
@ -56,3 +70,6 @@
|
|||||||
- python3-devel
|
- python3-devel
|
||||||
- python3-tox
|
- python3-tox
|
||||||
- pipenv
|
- pipenv
|
||||||
|
- mock
|
||||||
|
- rpmdevtools
|
||||||
|
- rpm-build
|
||||||
|
4621
urllib3-1.25.3.patch
Normal file
4621
urllib3-1.25.3.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user