Skip to content

Commit 51f1743

Browse files
azure: Don't customize pip's builddir
As of 21.3 pip: > Remove the --build-dir option and aliases, one last time. (pypa/pip#10485) https://pip.pypa.io/en/stable/news/#v21-3 Previous versions warn about deprecation. The builddir is provided to pip via env variable PIP_BUILD in Tox task. The purpose of changing of default builddir was noexec mount option for /tmp in Travis (see 17d571c). Since Travis is no longer used and Azure lacks this issue the PIP_BUILD can be safely removed. Note: pip 21.3 just ignores this env variable, which is more than can be said for the command line option. It's better to clean it up, since the behaviour may be changed in future. This is effectively the revert of 17d571c. Fixes: https://pagure.io/freeipa/issue/9011 Signed-off-by: Stanislav Levin <[email protected]>
1 parent 8f1dda6 commit 51f1743

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

.tox-install.sh

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ set -ex
44
FLAVOR="$1"
55
ENVPYTHON="$(realpath -s "$2")"
66
ENVSITEPACKAGESDIR="$(realpath -s "$3")"
7-
ENVDIR="$4"
8-
# 4...end are package requirements
9-
shift 4
7+
# 3...end are package requirements
8+
shift 3
109

1110
TOXINIDIR="$(cd "$(dirname "$0")" && pwd)"
1211

@@ -26,21 +25,10 @@ if [ ! -f "${TOXINIDIR}/tox.ini" ]; then
2625
exit 3
2726
fi
2827

29-
if [ ! -d "${ENVDIR}" ]; then
30-
echo "${ENVDIR}: no such directory"
31-
exit 4
32-
fi
33-
3428
# https://pip.pypa.io/en/stable/user_guide/#environment-variables
3529
export PIP_CACHE_DIR="${TOXINIDIR}/.tox/cache"
3630
mkdir -p "${PIP_CACHE_DIR}"
3731

38-
# /tmp could be mounted with noexec option.
39-
# pip checks if path is executable and if not then doesn't set such
40-
# permission bits
41-
export PIP_BUILD="${ENVDIR}/pip_build"
42-
rm -rf "${PIP_BUILD}"
43-
4432
DISTBUNDLE="${TOXINIDIR}/dist/bundle"
4533
mkdir -p "${DISTBUNDLE}"
4634

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ skipsdist=true
88
# always re-create virtual env. A special install helper is used to configure,
99
# build and install packages.
1010
recreate=True
11-
install_command={toxinidir}/.tox-install.sh wheel_bundle {envpython} {envsitepackagesdir} {envdir} {packages}
11+
install_command={toxinidir}/.tox-install.sh wheel_bundle {envpython} {envsitepackagesdir} {packages}
1212
changedir={envdir}
1313
setenv=
1414
HOME={envtmpdir}
@@ -34,7 +34,7 @@ commands=
3434

3535
[testenv:pypi]
3636
recreate=True
37-
install_command={toxinidir}/.tox-install.sh pypi_packages {envpython} {envsitepackagesdir} {envdir} {packages}
37+
install_command={toxinidir}/.tox-install.sh pypi_packages {envpython} {envsitepackagesdir} {packages}
3838
changedir={envdir}
3939
setenv=
4040
HOME={envtmpdir}

0 commit comments

Comments
 (0)