Skip to content

Commit bd814ae

Browse files
committed
CI: patch pip to fix issue with Homebrew Python
See pypa/pip#11598.
1 parent 9ca5d23 commit bd814ae

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/tests.yml

+12
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,18 @@ jobs:
205205
brew install --overwrite python@${{ matrix.python }}
206206
echo /usr/local/opt/python@${{ matrix.python }}/libexec/bin/ >> $GITHUB_PATH
207207
208+
- name: Patch pip
209+
# Patch https://github.com/pypa/pip/issues/11539
210+
run: |
211+
cat >>/usr/local/lib/python${{ matrix.python }}/site-packages/pip/_internal/locations/_sysconfig.py <<EOF
212+
def get_prefixed_libs(prefix: str) -> typing.Tuple[str, str]:
213+
if "venv" in sysconfig.get_scheme_names():
214+
paths = sysconfig.get_paths(vars={"base": prefix, "platbase": prefix}, scheme="venv")
215+
else:
216+
paths = sysconfig.get_paths(vars={"base": prefix, "platbase": prefix})
217+
return (paths["purelib"], paths["platlib"])
218+
EOF
219+
208220
- name: Install
209221
run: python -m pip --disable-pip-version-check install .[test]
210222

0 commit comments

Comments
 (0)