Allow setting $TMPDIR to $PWD/... during pip wheel

Needed for https://bugzilla.redhat.com/show_bug.cgi?id=1806625
This commit is contained in:
Miro Hrončok 2020-04-10 15:30:03 +02:00
commit 4347c1397d
2 changed files with 159 additions and 1 deletions

View file

@ -16,7 +16,7 @@ Name: python-%{srcname}
# When updating, update the bundled libraries versions bellow!
# You can use vendor_meta.sh in the dist git repo
Version: 20.0.2
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A tool for installing and managing Python packages
# We bundle a lot of libraries with pip, which itself is under MIT license.
@ -94,6 +94,11 @@ Patch4: dummy-certifi.patch
# this warning is juts moot. Also, the warning breaks CPython test suite.
Patch5: nowarn-pip._internal.main.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
Patch6: https://github.com/pypa/pip/pull/7873.patch
# Downstream only patch
# Users might have local installations of pip from using
# `pip install --user --upgrade pip` on older/newer versions.
@ -253,6 +258,7 @@ popd
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
# this goes together with patch4
rm src/pip/_vendor/certifi/*.pem
@ -379,6 +385,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip
%{python_wheeldir}/%{python_wheelname}
%changelog
* Fri Apr 10 2020 Miro Hrončok <mhroncok@redhat.com> - 20.0.2-3
- Allow setting $TMPDIR to $PWD/... during pip wheel (#1806625)
* Tue Mar 10 2020 Miro Hrončok <mhroncok@redhat.com> - 20.0.2-2
- Don't warn the user about pip._internal.main() entrypoint to fix ensurepip