From 0720a17ab85b2606c85b8b608c0be172531a396d Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 9 Sep 2023 07:33:54 -0700 Subject: [PATCH 1/4] Run wheel build on PRs --- .github/workflows/pypi_upload.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index 9be231dd305..ab2c6402c23 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -1,8 +1,9 @@ -name: Publish to PyPI +name: Build wheels and publish to PyPI on: release: types: [published] + pull_request: permissions: contents: read @@ -28,7 +29,8 @@ jobs: - name: Build wheel and source distributions run: python -m build - - name: Upload to PyPI via Twine + - if: github.event_name == 'release' + name: Upload to PyPI via Twine env: TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} run: twine upload --verbose -u '__token__' dist/* @@ -68,7 +70,8 @@ jobs: name: ${{ matrix.name }}-mypyc-wheels path: ./wheelhouse/*.whl - - name: Upload wheels to PyPI via Twine + - if: github.event_name == 'release' + name: Upload wheels to PyPI via Twine env: TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} run: pipx run twine upload --verbose -u '__token__' wheelhouse/*.whl @@ -87,7 +90,8 @@ jobs: ref: stable fetch-depth: 0 - - name: Update stable branch to release tag & push + - if: github.event_name == 'release' + name: Update stable branch to release tag & push run: | git reset --hard ${{ github.event.release.tag_name }} git push From e8f42bcfdf470df5089249c02d2ec28d6e48ec8a Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sat, 9 Sep 2023 21:14:58 -0700 Subject: [PATCH 2/4] skips to unblock --- .github/workflows/pypi_upload.yml | 1 + pyproject.toml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index ab2c6402c23..6c1e8b08670 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -63,6 +63,7 @@ jobs: uses: pypa/cibuildwheel@v2.15.0 env: CIBW_ARCHS_MACOS: "${{ matrix.macos_arch }}" + CIBW_SKIP: "cp312-*" - name: Upload wheels as workflow artifacts uses: actions/upload-artifact@v3 diff --git a/pyproject.toml b/pyproject.toml index ebfbede8559..852f3237e6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -132,6 +132,8 @@ exclude = [ "/src/black/concurrency.py", "/src/black/files.py", "/src/black/report.py", + # Pickling of FileData is broken, skip compilation for now: + "/src/black/cache.py", # Breaks the test suite when compiled (and is also useless): "/src/black/debug.py", # Compiled modules can't be run directly and that's a problem here: From 87fca596c9721511c1b41ba444f3a7979480cdbd Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sat, 9 Sep 2023 21:37:29 -0700 Subject: [PATCH 3/4] move --- .github/workflows/pypi_upload.yml | 1 - pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index 6c1e8b08670..ab2c6402c23 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -63,7 +63,6 @@ jobs: uses: pypa/cibuildwheel@v2.15.0 env: CIBW_ARCHS_MACOS: "${{ matrix.macos_arch }}" - CIBW_SKIP: "cp312-*" - name: Upload wheels as workflow artifacts uses: actions/upload-artifact@v3 diff --git a/pyproject.toml b/pyproject.toml index 852f3237e6b..0359021e8fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,7 +148,7 @@ build-verbosity = 1 # - Architecture (64-bit only): amd64 / x86_64, universal2, and arm64 # - OS: Linux (no musl), Windows, and macOS build = "cp3*-*" -skip = ["*-manylinux_i686", "*-musllinux_*", "*-win32", "pp-*"] +skip = ["*-manylinux_i686", "*-musllinux_*", "*-win32", "pp-*", "cp312-*"] # This is the bare minimum needed to run the test suite. Pulling in the full # test_requirements.txt would download a bunch of other packages not necessary # here and would slow down the testing step a fair bit. From c81b8e8be8577efbb31a1b79800f8702b7ee4c15 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sun, 10 Sep 2023 16:18:06 -0700 Subject: [PATCH 4/4] compile more --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d987e2fee00..159907ac8ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -132,8 +132,6 @@ exclude = [ "/src/black/concurrency.py", "/src/black/files.py", "/src/black/report.py", - # Pickling of FileData is broken, skip compilation for now: - "/src/black/cache.py", # Breaks the test suite when compiled (and is also useless): "/src/black/debug.py", # Compiled modules can't be run directly and that's a problem here: