From 3208269bdd8b39bd1e0abbd53ed83a171ce26d6c Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Thu, 16 May 2024 17:49:14 -0700 Subject: [PATCH] re-enable Linux, fix args --- .github/workflows/ci.yaml | 441 +++++++++++---------- MANIFEST.in | 1 + packaging/{pep517.py => _pyyaml_pep517.py} | 0 pyproject.toml | 2 +- setup.py | 2 +- 5 files changed, 242 insertions(+), 204 deletions(-) rename packaging/{pep517.py => _pyyaml_pep517.py} (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d517cf83..2cb3f004 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,6 +7,12 @@ on: # types: [opened, synchronize, reopened] workflow_dispatch: inputs: + libyaml_repo: + type: string + default: https://github.com/yaml/libyaml + libyaml_ref: + type: string + default: 0.2.5 skip_artifact_upload: type: boolean default: true @@ -18,206 +24,235 @@ on: default: true env: - LIBYAML_REPO: https://github.com/yaml/libyaml - LIBYAML_REF: 0.2.5 + LIBYAML_REPO: ${{ inputs.libyaml_repo || 'https://github.com/yaml/libyaml' }} # FIXME: can we ref the input.default value? + LIBYAML_REF: ${{ inputs.libyaml_ref || '0.2.5' }} # FIXME: can we ref the input.default value? skip_ci_redundant_jobs: ${{ inputs.skip_ci_redundant_jobs || github.event_name == 'pull_request' || github.event_name == 'push' }} skip_slow_jobs: ${{ inputs.skip_slow_jobs || github.event_name == 'pull_request' || github.event_name == 'push' }} skip_artifact_upload: ${{ inputs.skip_artifact_upload || true }} # ${{ github.event_name == 'pull_request' }} jobs: -# python_sdist: -# name: pyyaml sdist -# runs-on: ubuntu-22.04 -# steps: -# - name: Checkout PyYAML -# uses: actions/checkout@v4 -# -# - name: Install a python -# uses: actions/setup-python@v5 -# with: -# python-version: 3.x -# -# - name: Build sdist -# env: -# PYYAML_FORCE_CYTHON: 1 -# PYYAML_FORCE_LIBYAML: 0 -# run: | -# python -V -# python -m pip install build -# -# python -m build . -# -# # Ensure exactly one artifact was produced. -# [[ $(shopt -s nullglob; ls dist/*.tar.gz | wc -w) == 1 ]] || { -# echo "Unexpected content in dist dir: '$(ls dist/*.tar.gz)'." -# exit 1 -# } -# -# - name: Test sdist -# run: | -# # Install some libyaml headers. -# # TODO Should we smoke test the sdist against the libyaml we built? -# sudo apt update -# sudo apt install libyaml-dev -y -# -# # Ensure Cython is not present so we use only what's in the sdist. -# python -m pip uninstall Cython -y || true -# -# # Pass no extra args. -# # We should auto-install with libyaml since it's present. -# python -m pip install dist/*.tar.gz -v -# -# python packaging/build/smoketest.py -# -# - name: Upload sdist artifact -# uses: actions/upload-artifact@v3 -# with: -# name: dist -# path: dist/*.tar.gz -# -# -# linux_libyaml: -# name: libyaml ${{matrix.cfg.arch}} ${{matrix.cfg.platform}} -# runs-on: ubuntu-22.04 -# strategy: -# # FIXME: dynamic matrix away the slow ones -# matrix: -# cfg: -# - { platform: manylinux1, arch: x86_64 } -# - { platform: manylinux2014, arch: x86_64 } -# - { platform: manylinux2014, arch: aarch64 } -# - { platform: manylinux2014, arch: s390x } -# - { platform: musllinux_1_1, arch: x86_64 } -# - { platform: musllinux_1_1, arch: aarch64 } -# env: -# DOCKER_IMAGE: quay.io/pypa/${{matrix.cfg.platform}}_${{matrix.cfg.arch}} -# steps: -# - name: Check cached libyaml state -# id: cached_libyaml -# uses: actions/cache@v4 -# with: -# path: libyaml -# key: libyaml_${{matrix.cfg.platform}}_${{matrix.cfg.arch}}_${{env.LIBYAML_REF}} -# -# - name: configure docker foreign arch support -# uses: docker/setup-qemu-action@v3 -# if: matrix.cfg.arch != 'x86_64' && steps.cached_libyaml.outputs.cache-hit != 'true' -# -# - name: Checkout pyyaml -# uses: actions/checkout@v4 -# if: steps.cached_libyaml.outputs.cache-hit != 'true' -# -# - name: Build libyaml -# run: > -# docker run --rm -# --volume "$(pwd):/io" -# --env LIBYAML_REF -# --env LIBYAML_REPO -# --workdir /io -# "$DOCKER_IMAGE" -# /io/packaging/build/libyaml.sh -# if: steps.cached_libyaml.outputs.cache-hit != 'true' -# -# - name: ensure output is world readable (or cache fill fails with Permission Denied) -# run: > -# sudo chmod -R a+r ./libyaml/ -# if: steps.cached_libyaml.outputs.cache-hit != 'true' -# -# make_linux_pyyaml_matrix: -# runs-on: ubuntu-22.04 -# outputs: -# matrix_json: ${{ steps.make_matrix.outputs.matrix_json }} -# steps: -# - uses: actions/checkout@v4 -# - name: make a matrix -# id: make_matrix -# uses: ./.github/actions/dynamatrix -# with: -# matrix_yaml: | -# include: -# - { platform: manylinux1, arch: x86_64, spec: cp38, omit: ${{ env.skip_ci_redundant_jobs }} } -# - { platform: manylinux1, arch: x86_64, spec: cp39, omit: ${{ env.skip_ci_redundant_jobs }} } -# - { platform: manylinux2014, arch: x86_64, spec: cp310, omit: ${{ env.skip_ci_redundant_jobs }} } -# - { platform: manylinux2014, arch: x86_64, spec: cp311, omit: ${{ env.skip_ci_redundant_jobs }} } -# - { platform: manylinux2014, arch: x86_64, spec: cp312, omit: ${{ env.skip_ci_redundant_jobs }} } -# - { platform: manylinux2014, arch: x86_64, spec: cp313, cibw_version: "https://github.com/nitzmahone/cibuildwheel/archive/refs/heads/py313_support.zip" } -# - { platform: manylinux2014, arch: aarch64, spec: cp38, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: manylinux2014, arch: aarch64, spec: cp39, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: manylinux2014, arch: aarch64, spec: cp310, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: manylinux2014, arch: aarch64, spec: cp311, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: manylinux2014, arch: aarch64, spec: cp312, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: manylinux2014, arch: aarch64, spec: cp313, cibw_version: "https://github.com/nitzmahone/cibuildwheel/archive/refs/heads/py313_support.zip", omit: ${{ env.skip_slow_jobs }} } -# - { platform: manylinux2014, arch: s390x, spec: cp38, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: manylinux2014, arch: s390x, spec: cp39, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: manylinux2014, arch: s390x, spec: cp310, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: manylinux2014, arch: s390x, spec: cp311, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: manylinux2014, arch: s390x, spec: cp312, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: manylinux2014, arch: s390x, spec: cp313, cibw_version: "https://github.com/nitzmahone/cibuildwheel/archive/refs/heads/py313_support.zip", omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: musllinux_1_1, arch: x86_64, spec: cp38, omit: ${{ env.skip_ci_redundant_jobs }} } -# - { platform: musllinux_1_1, arch: x86_64, spec: cp39, omit: ${{ env.skip_ci_redundant_jobs }} } -# - { platform: musllinux_1_1, arch: x86_64, spec: cp310, omit: ${{ env.skip_ci_redundant_jobs }} } -# - { platform: musllinux_1_1, arch: x86_64, spec: cp311, omit: ${{ env.skip_ci_redundant_jobs }} } -# - { platform: musllinux_1_1, arch: x86_64, spec: cp312, omit: ${{ env.skip_ci_redundant_jobs }} } -# - { platform: musllinux_1_1, arch: x86_64, spec: cp313, cibw_version: "https://github.com/nitzmahone/cibuildwheel/archive/refs/heads/py313_support.zip", omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: musllinux_1_1, arch: aarch64, spec: cp39, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: musllinux_1_1, arch: aarch64, spec: cp310, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: musllinux_1_1, arch: aarch64, spec: cp311, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: musllinux_1_1, arch: aarch64, spec: cp312, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } -# - { platform: musllinux_1_1, arch: aarch64, spec: cp313, cibw_version: "https://github.com/nitzmahone/cibuildwheel/archive/refs/heads/py313_support.zip", omit: ${{ env.skip_slow_jobs }} } -# -# -# linux_pyyaml: -# needs: [linux_libyaml, make_linux_pyyaml_matrix] -# name: pyyaml ${{matrix.arch}} ${{matrix.platform}} ${{matrix.spec}} -# runs-on: ubuntu-22.04 -# strategy: -# fail-fast: false -# matrix: ${{ fromJSON(needs.make_linux_pyyaml_matrix.outputs.matrix_json) }} -# -# steps: -# - name: Checkout PyYAML -# uses: actions/checkout@v4 -# -# - name: Fetch cached libyaml -# id: cached_libyaml -# uses: actions/cache/restore@v4 -# with: -# path: libyaml -# key: libyaml_${{matrix.platform}}_${{matrix.arch}}_${{env.LIBYAML_REF}} -# fail-on-cache-miss: true -# -# - name: configure docker foreign arch support -# uses: docker/setup-qemu-action@v3 -# if: matrix.arch != 'x86_64' -# -# - name: Build/Test/Package -# env: -# CIBW_ARCHS: all -# # HACK: ick, maybe deconstruct the matrix a bit or query cibuildwheel for its default target *linux spec first? -# CIBW_BUILD: ${{matrix.spec}}-${{ contains(matrix.platform, 'musllinux') && 'musllinux' || 'manylinux' }}_${{matrix.arch}} -# CIBW_BUILD_VERBOSITY: 1 -# # containerized Linux builds require explicit CIBW_ENVIRONMENT -# CIBW_ENVIRONMENT: > -# C_INCLUDE_PATH=libyaml/include -# LIBRARY_PATH=libyaml/src/.libs -# LD_LIBRARY_PATH=libyaml/src/.libs -# PYYAML_FORCE_CYTHON=1 -# PYYAML_FORCE_LIBYAML=1 -# CIBW_TEST_COMMAND: cd {project}; pytest -# CIBW_TEST_REQUIRES: pytest -# run: | -# set -eux -# python3 -V -# python3 -m pip install -U --user ${{ matrix.cibw_version || 'cibuildwheel' }} -# python3 -m cibuildwheel --platform auto --output-dir dist . -# -# - name: Upload artifacts -# uses: actions/upload-artifact@v3 -# with: -# name: dist -# path: dist/*.whl -# if-no-files-found: error -# if: ${{ ! env.skip_artifact_upload }} + python_sdist: + name: pyyaml sdist + runs-on: ubuntu-22.04 + steps: + - name: Checkout PyYAML + uses: actions/checkout@v4 + + - name: Install a python + uses: actions/setup-python@v5 + with: + python-version: 3.x + + - name: Build sdist + env: + PYYAML_FORCE_CYTHON: 1 + PYYAML_FORCE_LIBYAML: 0 + run: | + python -V + python -m pip install build + + python -m build . + + # Ensure exactly one .tar.gz artifact was produced. + [[ $(shopt -s nullglob; ls dist/*.tar.gz | wc -w) == 1 ]] || { + echo "Unexpected content in dist dir: '$(ls dist/*.tar.gz)'." + exit 1 + } + + - name: Test sdist + run: | + # Install some libyaml headers. + # TODO Should we smoke test the sdist against the libyaml we built? + sudo apt update + sudo apt install libyaml-dev -y + + mkdir distout && cd distout + tar zxvf $(ls ../dist/*.tar.gz) + python -m build -w $(ls ./dist/*.tar.gz) + + # FIXME: smoketest + + cd .. + + # Pass no extra args. + # We should auto-install with libyaml since it's present. + python -m pip install dist/*.tar.gz -v + + python packaging/build/smoketest.py + + echo "ARTIFACT_NAME=$(ls ./dist/)" >> "$GITHUB_OUTPUT" + # FIXME: ensure exactly one artifact + + # FIXME: build wheels against the sdist, but also ensure that direct wheel build works- both can fail in different ways + # eg, missing backend bits in MANIFEST.in allows sdist build to succeed, but the resulting sdist is not usable to build a wheel + + - name: Upload sdist artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.build.outputs.ARTIFACT_NAME }} + path: dist/${{ steps.build.outputs.ARTIFACT_NAME }} + if-no-files-found: error + if: ${{ ! env.skip_artifact_upload }} + + make_linux_libyaml_matrix: + runs-on: ubuntu-22.04 + outputs: + matrix_json: ${{ steps.make_matrix.outputs.matrix_json }} + steps: + - uses: actions/checkout@v4 + - name: make a matrix + id: make_matrix + uses: ./.github/actions/dynamatrix + with: + matrix_yaml: | + include: + - { platform: manylinux1, arch: x86_64 } + - { platform: manylinux2014, arch: x86_64 } + - { platform: manylinux2014, arch: aarch64, omit: ${{ env.skip_slow_jobs }} } + - { platform: manylinux2014, arch: s390x, omit: ${{ env.skip_slow_jobs }} } + - { platform: musllinux_1_1, arch: x86_64 } + - { platform: musllinux_1_1, arch: aarch64, omit: ${{ env.skip_slow_jobs }} } + + linux_libyaml: + needs: [make_linux_libyaml_matrix] + name: libyaml ${{ matrix.platform }} ${{ matrix.arch }} + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: ${{ fromJSON(needs.make_linux_libyaml_matrix.outputs.matrix_json) }} + env: + DOCKER_IMAGE: quay.io/pypa/${{ matrix.platform }}_${{ matrix.arch }} + steps: + - name: Check cached libyaml state + id: cached_libyaml + uses: actions/cache@v4 + with: + path: libyaml + key: libyaml_${{ matrix.platform }}_${{ matrix.arch }}_${{ env.LIBYAML_REF }} + + - name: configure docker foreign arch support + uses: docker/setup-qemu-action@v3 + if: matrix.arch != 'x86_64' && steps.cached_libyaml.outputs.cache-hit != 'true' + + - name: Checkout pyyaml + uses: actions/checkout@v4 + if: steps.cached_libyaml.outputs.cache-hit != 'true' + + - name: Build libyaml + run: > + docker run --rm + --volume "$(pwd):/io" + --env LIBYAML_REF + --env LIBYAML_REPO + --workdir /io + "$DOCKER_IMAGE" + /io/packaging/build/libyaml.sh + if: steps.cached_libyaml.outputs.cache-hit != 'true' + + - name: ensure output is world readable (or cache fill fails with Permission Denied) + run: > + sudo chmod -R a+r ./libyaml/ + if: steps.cached_libyaml.outputs.cache-hit != 'true' + + make_linux_pyyaml_matrix: + runs-on: ubuntu-22.04 + outputs: + matrix_json: ${{ steps.make_matrix.outputs.matrix_json }} + steps: + - uses: actions/checkout@v4 + - name: make a matrix + id: make_matrix + uses: ./.github/actions/dynamatrix + with: + matrix_yaml: | + include: + - { platform: manylinux1, arch: x86_64, spec: cp38, omit: ${{ env.skip_ci_redundant_jobs }} } + - { platform: manylinux1, arch: x86_64, spec: cp39, omit: ${{ env.skip_ci_redundant_jobs }} } + - { platform: manylinux2014, arch: x86_64, spec: cp310, omit: ${{ env.skip_ci_redundant_jobs }} } + - { platform: manylinux2014, arch: x86_64, spec: cp311, omit: ${{ env.skip_ci_redundant_jobs }} } + - { platform: manylinux2014, arch: x86_64, spec: cp312, omit: ${{ env.skip_ci_redundant_jobs }} } + - { platform: manylinux2014, arch: x86_64, spec: cp313, cibw_version: "https://github.com/nitzmahone/cibuildwheel/archive/refs/heads/py313_support.zip" } + - { platform: manylinux2014, arch: aarch64, spec: cp38, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: manylinux2014, arch: aarch64, spec: cp39, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: manylinux2014, arch: aarch64, spec: cp310, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: manylinux2014, arch: aarch64, spec: cp311, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: manylinux2014, arch: aarch64, spec: cp312, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: manylinux2014, arch: aarch64, spec: cp313, cibw_version: "https://github.com/nitzmahone/cibuildwheel/archive/refs/heads/py313_support.zip", omit: ${{ env.skip_slow_jobs }} } + - { platform: manylinux2014, arch: s390x, spec: cp38, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: manylinux2014, arch: s390x, spec: cp39, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: manylinux2014, arch: s390x, spec: cp310, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: manylinux2014, arch: s390x, spec: cp311, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: manylinux2014, arch: s390x, spec: cp312, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: manylinux2014, arch: s390x, spec: cp313, cibw_version: "https://github.com/nitzmahone/cibuildwheel/archive/refs/heads/py313_support.zip", omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: musllinux_1_1, arch: x86_64, spec: cp38, omit: ${{ env.skip_ci_redundant_jobs }} } + - { platform: musllinux_1_1, arch: x86_64, spec: cp39, omit: ${{ env.skip_ci_redundant_jobs }} } + - { platform: musllinux_1_1, arch: x86_64, spec: cp310, omit: ${{ env.skip_ci_redundant_jobs }} } + - { platform: musllinux_1_1, arch: x86_64, spec: cp311, omit: ${{ env.skip_ci_redundant_jobs }} } + - { platform: musllinux_1_1, arch: x86_64, spec: cp312, omit: ${{ env.skip_ci_redundant_jobs }} } + - { platform: musllinux_1_1, arch: x86_64, spec: cp313, cibw_version: "https://github.com/nitzmahone/cibuildwheel/archive/refs/heads/py313_support.zip", omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: musllinux_1_1, arch: aarch64, spec: cp39, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: musllinux_1_1, arch: aarch64, spec: cp310, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: musllinux_1_1, arch: aarch64, spec: cp311, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: musllinux_1_1, arch: aarch64, spec: cp312, omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }} } + - { platform: musllinux_1_1, arch: aarch64, spec: cp313, cibw_version: "https://github.com/nitzmahone/cibuildwheel/archive/refs/heads/py313_support.zip", omit: ${{ env.skip_slow_jobs }} } + + + linux_pyyaml: + needs: [linux_libyaml, make_linux_pyyaml_matrix] + name: pyyaml ${{matrix.spec}} + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: ${{ fromJSON(needs.make_linux_pyyaml_matrix.outputs.matrix_json) }} + + steps: + - name: Checkout PyYAML + uses: actions/checkout@v4 + + - name: Fetch cached libyaml + id: cached_libyaml + uses: actions/cache/restore@v4 + with: + path: libyaml + key: libyaml_${{matrix.platform}}_${{matrix.arch}}_${{env.LIBYAML_REF}} + fail-on-cache-miss: true + + - name: configure docker foreign arch support + uses: docker/setup-qemu-action@v3 + if: matrix.arch != 'x86_64' + + - name: Build/Test/Package + env: + CIBW_ARCHS: all + # HACK: ick, maybe deconstruct the matrix a bit or query cibuildwheel for its default target *linux spec first? + CIBW_BUILD: ${{matrix.spec}}-${{ contains(matrix.platform, 'musllinux') && 'musllinux' || 'manylinux' }}_${{matrix.arch}} + CIBW_BUILD_VERBOSITY: 1 + # containerized Linux builds require explicit CIBW_ENVIRONMENT + CIBW_ENVIRONMENT: > + C_INCLUDE_PATH=libyaml/include + LIBRARY_PATH=libyaml/src/.libs + LD_LIBRARY_PATH=libyaml/src/.libs + PYYAML_FORCE_CYTHON=1 + PYYAML_FORCE_LIBYAML=1 + CIBW_TEST_COMMAND: cd {project}; pytest + CIBW_TEST_REQUIRES: pytest + run: | + set -eux + python3 -V + python3 -m pip install -U --user ${{ matrix.cibw_version || 'cibuildwheel' }} + python3 -m cibuildwheel --platform auto --output-dir dist . + + echo "ARTIFACT_NAME=$(ls ./dist/)" >> "$GITHUB_OUTPUT" + # FIXME: ensure exactly one artifact + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.build.outputs.ARTIFACT_NAME }} + path: dist/*.whl + if-no-files-found: error + if: ${{ ! env.skip_artifact_upload }} + # # macos_libyaml: # name: libyaml macos ${{matrix.arch}} @@ -346,22 +381,20 @@ jobs: # if-no-files-found: error windows_libyaml: - name: libyaml ${{matrix.platform}} ${{matrix.arch}} - runs-on: ${{matrix.platform}} + name: libyaml windows ${{ matrix.arch }} + runs-on: ${{ matrix.platform || 'windows-2022' }} strategy: matrix: include: - - platform: windows-2022 - arch: x64 - - platform: windows-2022 - arch: win32 + - arch: x64 + - arch: win32 steps: - name: Get cached libyaml state id: cached_libyaml uses: actions/cache@v4 with: path: libyaml - key: libyaml_${{'windows'}}_${{matrix.arch}}_${{env.LIBYAML_REF}} + key: libyaml_${{ 'windows' }}_${{ matrix.arch }}_${{ env.LIBYAML_REF }} - name: Build libyaml shell: bash @@ -461,6 +494,8 @@ jobs: - name: Install python uses: actions/setup-python@v5 + with: + python-version: 3.x - name: Build/Test/Package id: build @@ -487,6 +522,8 @@ jobs: path: dist/*.whl if-no-files-found: error +# FIXME: artifact combine job? +# # check: # if: always() # needs: diff --git a/MANIFEST.in b/MANIFEST.in index 2c9cf0da..91e05029 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,7 @@ include CHANGES README LICENSE Makefile pyproject.toml setup.py recursive-include lib/yaml *.py recursive-include lib/_yaml *.py +recursive-include packaging * recursive-include examples *.py *.cfg *.yaml recursive-include tests/legacy_tests/ *.py recursive-include tests/legacy_tests/data * diff --git a/packaging/pep517.py b/packaging/_pyyaml_pep517.py similarity index 100% rename from packaging/pep517.py rename to packaging/_pyyaml_pep517.py diff --git a/pyproject.toml b/pyproject.toml index a497adf0..d8e5b969 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,4 +6,4 @@ requires = [ "Cython>=3.0; python_version >= '3.13'" ] backend-path = ["packaging"] -build-backend = "pep517" +build-backend = "_pyyaml_pep517" diff --git a/setup.py b/setup.py index 3fffc1cd..84bc2e46 100644 --- a/setup.py +++ b/setup.py @@ -102,7 +102,7 @@ try: - from pep517 import ActiveConfigSettings + from _pyyaml_pep517 import ActiveConfigSettings except ImportError: class ActiveConfigSettings: @staticmethod