make aarch64 wheels
MODIFY
.github/workflows/build_linux.yml
.github/workflows/build_linux.yml
@@ -39,13 +39,30 @@ jobs:
with:
build-requirements: 'cython'
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
- - name: Archive wheels
+
+ - name: Set up QEMU
+ if: ${{ matrix.py == '3.10.0' }}
+ uses: docker/setup-qemu-action@v2
+ - name: Cythonize
+ if: ${{ matrix.py == '3.10.0' }}
+ run: |
+ make clean
+ make all
+ - name: Build wheels
if: ${{ matrix.py == '3.10.0' }}
+ uses: pypa/cibuildwheel@2.6.1
+ env:
+ CIBW_ARCHS_LINUX: aarch64
+ - name: Archive all wheels
uses: actions/upload-artifact@v3
+ if: ${{ matrix.py == '3.10.0' }}
with:
name: linux-wheels
- path: dist/*-manylinux*.whl
+ path: |
+ ./wheelhouse/*.whl
+ dist/*-manylinux*.whl
if-no-files-found: error
+
- name: Make release
if: ${{ github.event_name == 'create' && github.event.ref_type == 'tag' && matrix.py == '3.10.0' }}
continue-on-error: true
@@ -82,3 +99,15 @@ jobs:
});
}
}
+ for (let file of await fs.readdir('wheelhouse')) {
+ if (file.includes('aarch64')) {
+ console.log('uploading', file);
+
+ await github.repos.uploadReleaseAsset({
+ owner, repo,
+ release_id: ${{ env.release_id }},
+ name: file,
+ data: await fs.readFile(`wheelhouse/${file}`)
+ });
+ }
+ }

DELETE
.travis.yml
-language: python
-dist: focal
-arch:
- - arm64
-python:
- - "3.7"
- - "3.8"
- - "3.9"
- - "3.10.0"
-
-before_install:
- - sudo apt-get install -y libsnappy-dev
- - pip install python-snappy
- # https://github.com/psf/black/issues/1847
- - pip install "pip<20.3"
-install:
- - pip install -r developer_requirements.txt
-script:
- - ./run-tests.sh
- - codecov
- - export DOCKER_IMAGE=quay.io/pypa/manylinux2014_$(arch)
-
-after_success:
- - if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "linux" && $TRAVIS_PYTHON_VERSION != *"pypy"* ]]; then
- docker run --rm -v "$(pwd):/data" $DOCKER_IMAGE bash -c "/data/.travis_build_wheel.sh $TRAVIS_PYTHON_VERSION";
- fi;
-
-deploy:
- provider: releases
- api_key:
- secure: "EihQ8C4NtMrh4phJ2VB/MniG2ceE/vxJ24EKroc8G7PyxH3us6abKDg/BDlkCQ2c/apJb+qh15OGwjsGw9z7x+6TCEIdgZ8AvXOHdQJGt7e9Mzw1SPui1AUxW67kT/35NwAzMhD0Yx3/mri8neUdbBSA6TCz3XD8XL12vEpbBRQ="
- file_glob: true
- file: 'dist/fastavro-*.whl'
- on:
- tags: true
- condition: $TRAVIS_PYTHON_VERSION != *"pypy"*

DELETE
.travis_build_wheel.sh
-#!/bin/bash
-
-cd `dirname $0`
-
-# The version comes in as something like 3.7, but we need it to be 37 for the
-# path in the container so we remove the period
-TRAVIS_PYTHON_VERSION=$1
-TRAVIS_PYTHON_VERSION=${TRAVIS_PYTHON_VERSION/.}
-
-versions="cp${TRAVIS_PYTHON_VERSION}-cp${TRAVIS_PYTHON_VERSION}
-cp${TRAVIS_PYTHON_VERSION}-cp${TRAVIS_PYTHON_VERSION}m
-cp${TRAVIS_PYTHON_VERSION}-cp${TRAVIS_PYTHON_VERSION}mu"
-
-for version in ${versions}; do
- echo $version
- if ls /opt/python/${version} &> /dev/null; then
- /opt/python/${version}/bin/pip install cython
- /opt/python/${version}/bin/python setup.py bdist_wheel
- fi
-done
-
-# Fix wheel
-for whl in dist/*.whl; do
- auditwheel repair "$whl" -w dist
-done
-
-# Remove unfixed wheel
-rm -rf dist/fastavro-*-linux_*
-# Remove the manylinux1 wheel
-rm -rf dist/fastavro-*-manylinux1_*

MODIFY
pyproject.toml
pyproject.toml
@@ -5,3 +5,7 @@ requires = [
"Cython",
]
build-backend = "setuptools.build_meta"
+
+[tool.cibuildwheel]
+# don't build PyPy wheels, install from source instead
+skip = "pp* *-musllinux*"

MODIFY
setup.cfg
setup.cfg
[check-manifest]
ignore =
- .travis.yml
- appveyor.yml
benchmark
benchmark/*
fastavro/_*.c

make aarch64 wheels