mirror of
https://github.com/ultrajson/ultrajson.git
synced 2024-05-07 22:16:12 +02:00
Build wheel for Python 3.12 beta (#594)
This commit is contained in:
commit
e1dfadc2b4
|
@ -35,10 +35,6 @@ jobs:
|
|||
cache: pip
|
||||
cache-dependency-path: ".github/workflows/deploy.yml"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U twine
|
||||
|
||||
# https://github.com/pypa/cibuildwheel
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.13.0
|
||||
|
@ -50,6 +46,8 @@ jobs:
|
|||
CIBW_ARCHS_MACOS: "x86_64 arm64"
|
||||
# Build only on Linux architectures that don't need qemu emulation.
|
||||
CIBW_ARCHS_LINUX: "x86_64 i686"
|
||||
# Include latest Python beta.
|
||||
CIBW_PRERELEASE_PYTHONS: True
|
||||
# Run the test suite after each build.
|
||||
CIBW_TEST_REQUIRES: "pytest"
|
||||
CIBW_TEST_COMMAND: pytest {package}/tests
|
||||
|
@ -62,20 +60,22 @@ jobs:
|
|||
|
||||
- name: Publish package to PyPI
|
||||
if: github.event.action == 'published'
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.pypi_password }}
|
||||
run: twine upload --skip-existing dist/*.whl
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.pypi_password }}
|
||||
skip-existing: true
|
||||
|
||||
- name: Publish package to TestPyPI
|
||||
if: |
|
||||
github.repository == 'ultrajson/ultrajson' &&
|
||||
github.ref == 'refs/heads/main'
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.test_pypi_password }}
|
||||
run: |
|
||||
twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/*.whl
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.test_pypi_password }}
|
||||
repository-url: https://test.pypi.org/legacy/
|
||||
skip-existing: true
|
||||
|
||||
build-QEMU-emulated-wheels:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -91,6 +91,7 @@ jobs:
|
|||
- cp39
|
||||
- cp310
|
||||
- cp311
|
||||
- cp312
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -103,10 +104,6 @@ jobs:
|
|||
cache: pip
|
||||
cache-dependency-path: ".github/workflows/deploy.yml"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U twine
|
||||
|
||||
# https://github.com/docker/setup-qemu-action
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
@ -127,6 +124,8 @@ jobs:
|
|||
CIBW_ARCHS_LINUX: "aarch64"
|
||||
# Likewise, select only one Python version per job to speed this up.
|
||||
CIBW_BUILD: "${{ matrix.python-version }}-*"
|
||||
# Include latest Python beta.
|
||||
CIBW_PRERELEASE_PYTHONS: True
|
||||
# Run the test suite after each build.
|
||||
CIBW_TEST_REQUIRES: "pytest"
|
||||
CIBW_TEST_COMMAND: pytest {package}/tests
|
||||
|
@ -139,20 +138,22 @@ jobs:
|
|||
|
||||
- name: Publish package to PyPI
|
||||
if: github.event.action == 'published'
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.pypi_password }}
|
||||
run: twine upload --skip-existing dist/*.whl
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.pypi_password }}
|
||||
skip-existing: true
|
||||
|
||||
- name: Publish package to TestPyPI
|
||||
if: |
|
||||
github.repository == 'ultrajson/ultrajson' &&
|
||||
github.ref == 'refs/heads/main'
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.test_pypi_password }}
|
||||
run: |
|
||||
twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/*.whl
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.test_pypi_password }}
|
||||
repository-url: https://test.pypi.org/legacy/
|
||||
skip-existing: true
|
||||
|
||||
build-sdist:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -173,7 +174,7 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U pip
|
||||
python -m pip install -U build twine wheel
|
||||
python -m pip install -U build twine
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
|
|
|
@ -39,11 +39,11 @@ repos:
|
|||
- id: trailing-whitespace
|
||||
exclude: "^.github/.*_TEMPLATE.md"
|
||||
|
||||
# Disabled due to asottile/setup-cfg-fmt#73. Re-enable once that issue is fixed.
|
||||
# - repo: https://github.com/asottile/setup-cfg-fmt
|
||||
# rev: v1.20.1
|
||||
# hooks:
|
||||
# - id: setup-cfg-fmt
|
||||
|
||||
- repo: https://github.com/asottile/setup-cfg-fmt
|
||||
rev: v2.3.0
|
||||
hooks:
|
||||
- id: setup-cfg-fmt
|
||||
args: [--include-version-classifiers, --max-py-version=3.12]
|
||||
ci:
|
||||
autoupdate_schedule: quarterly
|
||||
|
|
|
@ -19,6 +19,7 @@ classifiers =
|
|||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: 3.12
|
||||
download_url = https://github.com/ultrajson/ultrajson
|
||||
project_urls =
|
||||
Source=https://github.com/ultrajson/ultrajson
|
||||
|
|
Loading…
Reference in New Issue