Skip to content

Commit

Permalink
Hack installation of PyYAML on pypy
Browse files Browse the repository at this point in the history
Currently PyYAML fails to build with Cython 3.0.0a, thus
it fails to install from sdist using `pip install --pre`.

See yaml/pyyaml#601
  • Loading branch information
dairiki committed Nov 4, 2022
1 parent 5a21aad commit 5860bda
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,18 @@ jobs:
~/.cache/pre-commit
~/.cache/pip
key: ${{ matrix.python_version }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('setup.py') }}

- name: Use latest pip
run: python -m pip install --upgrade pip
- name: Pre-install PyYAML without --pre
if: ${{ startsWith(matrix.python_version, 'pypy') }}
# Temporary workaround:
# PyYAML fails to build with Cython 3.0.0a
# see https://github.com/yaml/pyyaml/issues/601
run: pip install PyYAML
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --pre -e '.[dev]'
run: pip install --pre -e '.[dev]'

- name: Pre-commit hooks
if: ${{ matrix.python_version != 'pypy3' && matrix.python_version != '3.6' }}
run: pre-commit run --all-files
Expand Down

0 comments on commit 5860bda

Please sign in to comment.