Skip to content

Commit

Permalink
CI: patch pip to fix issue with Homebrew Python
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolodi committed Nov 16, 2022
1 parent 9ca5d23 commit bd814ae
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
def get_prefixed_libs(prefix: str) -> 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]

Expand Down

0 comments on commit bd814ae

Please sign in to comment.