From 5860bdab1662768f6b80256af284367d4792ded2 Mon Sep 17 00:00:00 2001 From: Jeff Dairiki Date: Fri, 4 Nov 2022 10:20:30 -0700 Subject: [PATCH] Hack installation of PyYAML on pypy Currently PyYAML fails to build with Cython 3.0.0a, thus it fails to install from sdist using `pip install --pre`. See https://github.com/yaml/pyyaml/issues/601 --- .github/workflows/python-package.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 3c9dc83..f8e29ac 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -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