diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d421568b2..b9a0b53eb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -205,6 +205,18 @@ jobs: brew install --overwrite python@${{ matrix.python }} echo /usr/local/opt/python@${{ matrix.python }}/libexec/bin/ >> $GITHUB_PATH + - name: Patch pip + # Patch https://github.com/pypa/pip/issues/11539 + run: | + cat >>/usr/local/lib/python${{ matrix.python }}/site-packages/pip/_internal/locations/_sysconfig.py < typing.Tuple[str, str]: + if "venv" in sysconfig.get_scheme_names(): + paths = sysconfig.get_paths(vars={"base": prefix, "platbase": prefix}, scheme="venv") + else: + paths = sysconfig.get_paths(vars={"base": prefix, "platbase": prefix}) + return (paths["purelib"], paths["platlib"]) + EOF + - name: Install run: python -m pip --disable-pip-version-check install .[test]