Skip to content

Commit 91998b3

Browse files
authored
Merge pull request #7 from PaTara43/main
Added aarch64 and musllinux support
2 parents 425c7cd + 85632f7 commit 91998b3

3 files changed

Lines changed: 175 additions & 3 deletions

File tree

.github/workflows/lint-test-cover-docs-build-upload.yml

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,175 @@ jobs:
253253
with:
254254
name: ${{ env.WHEELNAME }}
255255
path: rbcl-wheelhouse\
256+
257+
manylinux2014_aarch64:
258+
runs-on: ubuntu-latest
259+
strategy:
260+
matrix:
261+
python:
262+
- { version: '3.8', abi: 'cp38' }
263+
- { version: '3.9', abi: 'cp39' }
264+
- { version: '3.10', abi: 'cp310' }
265+
- { version: '3.11', abi: 'cp311' }
266+
- { version: '3.12', abi: 'cp312' }
267+
268+
name: Python ${{ matrix.python.version }} with ABI ${{ matrix.python.abi }} for manylinux2014_aarch64
269+
env:
270+
CIBW_BUILD_VERBOSITY: 1
271+
CIBW_ARCHS_LINUX: "aarch64"
272+
CIBW_BUILD: "${{ matrix.python.abi }}-manylinux_aarch64"
273+
CIBW_PROJECT_REQUIRES_PYTHON: ">=${{ matrix.python.version }}"
274+
CIBW_ENVIRONMENT: LIBSODIUM_MAKE_ARGS="-j$(nproc)"
275+
CIBW_BEFORE_ALL: >
276+
pip install .[build] -v
277+
CIBW_REPAIR_WHEEL_COMMAND: ""
278+
CIBW_TEST_EXTRAS: "lint,test,docs"
279+
CIBW_BEFORE_TEST: >
280+
cd {project} &&
281+
cp build/lib*/rbcl/_sodium.py src/rbcl/_sodium.py &&
282+
pip3 install pystache~=0.6 setuptools &&
283+
yum install wget -y &&
284+
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz &&
285+
mv libsodium-1.0.18.tar.gz src/rbcl/libsodium.tar.gz
286+
CIBW_TEST_COMMAND: >
287+
cd {project} &&
288+
python -m pylint rbcl src/rbcl/_sodium.tmpl src/rbcl/_sodium_build.py --disable=duplicate-code &&
289+
python src/rbcl/rbcl.py -v &&
290+
python -m pytest &&
291+
cd docs &&
292+
sphinx-apidoc -f -E --templatedir=_templates -o _source .. ../src/rbcl/_sodium_build.py ** &&
293+
make html
294+
CIBW_DEBUG_TRACEBACK: True
295+
296+
steps:
297+
- uses: actions/checkout@v4
298+
299+
- name: Set up QEMU
300+
uses: docker/setup-qemu-action@v3
301+
with:
302+
platforms: arm64
303+
304+
- name: Build wheels
305+
uses: pypa/cibuildwheel@v2.20.0
306+
with:
307+
output-dir: dist
308+
309+
- name: Upload wheels
310+
uses: actions/upload-artifact@v4
311+
with:
312+
name: rbcl-${{ github.ref_name }}-${{ matrix.python.abi }}-manylinux2014_aarch64
313+
path: dist/*.whl
314+
315+
316+
musllinux_1_2_aarch64:
317+
runs-on: ubuntu-latest
318+
strategy:
319+
matrix:
320+
python:
321+
- { version: '3.8', abi: 'cp38' }
322+
- { version: '3.9', abi: 'cp39' }
323+
- { version: '3.10', abi: 'cp310' }
324+
- { version: '3.11', abi: 'cp311' }
325+
- { version: '3.12', abi: 'cp312' }
326+
327+
name: Python ${{ matrix.python.version }} with ABI ${{ matrix.python.abi }} for musllinux_1_2_aarch64
328+
env:
329+
CIBW_BUILD_VERBOSITY: 1
330+
CIBW_ARCHS_LINUX: "aarch64"
331+
CIBW_BUILD: "${{ matrix.python.abi }}-musllinux_aarch64"
332+
CIBW_PROJECT_REQUIRES_PYTHON: ">=${{ matrix.python.version }}"
333+
CIBW_ENVIRONMENT: LIBSODIUM_MAKE_ARGS="-j$(nproc)"
334+
CIBW_BEFORE_ALL: >
335+
pip install .[build] -v
336+
CIBW_REPAIR_WHEEL_COMMAND: ""
337+
CIBW_TEST_EXTRAS: "lint,test,docs"
338+
CIBW_BEFORE_TEST: >
339+
cd {project} &&
340+
cp build/lib*/rbcl/_sodium.py src/rbcl/_sodium.py &&
341+
pip3 install pystache~=0.6 setuptools &&
342+
apk add wget &&
343+
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz &&
344+
mv libsodium-1.0.18.tar.gz src/rbcl/libsodium.tar.gz
345+
CIBW_TEST_COMMAND: >
346+
cd {project} &&
347+
python -m pylint rbcl src/rbcl/_sodium.tmpl src/rbcl/_sodium_build.py --disable=duplicate-code &&
348+
python src/rbcl/rbcl.py -v &&
349+
python -m pytest &&
350+
cd docs &&
351+
sphinx-apidoc -f -E --templatedir=_templates -o _source .. ../src/rbcl/_sodium_build.py ** &&
352+
make html
353+
CIBW_DEBUG_TRACEBACK: True
354+
355+
steps:
356+
- uses: actions/checkout@v4
357+
358+
- name: Set up QEMU
359+
uses: docker/setup-qemu-action@v3
360+
with:
361+
platforms: arm64
362+
363+
- name: Build wheels
364+
uses: pypa/cibuildwheel@v2.20.0
365+
with:
366+
output-dir: dist
367+
368+
- name: Upload wheels
369+
uses: actions/upload-artifact@v4
370+
with:
371+
name: rbcl-${{ github.ref_name }}-${{ matrix.python.abi }}-musllinux_1_2_aarch64
372+
path: dist/*.whl
373+
374+
375+
376+
musllinux_1_2_x86_64:
377+
runs-on: ubuntu-latest
378+
strategy:
379+
matrix:
380+
python:
381+
- { version: '3.8', abi: 'cp38' }
382+
- { version: '3.9', abi: 'cp39' }
383+
- { version: '3.10', abi: 'cp310' }
384+
- { version: '3.11', abi: 'cp311' }
385+
- { version: '3.12', abi: 'cp312' }
386+
387+
name: Python ${{ matrix.python.version }} with ABI ${{ matrix.python.abi }} for musllinux_1_2_x86_64
388+
env:
389+
CIBW_BUILD_VERBOSITY: 1
390+
CIBW_ARCHS_LINUX: "x86_64"
391+
CIBW_BUILD: "${{ matrix.python.abi }}-musllinux_x86_64"
392+
CIBW_PROJECT_REQUIRES_PYTHON: ">=${{ matrix.python.version }}"
393+
CIBW_ENVIRONMENT: LIBSODIUM_MAKE_ARGS="-j$(nproc)"
394+
CIBW_BEFORE_ALL: >
395+
pip install .[build] -v
396+
CIBW_REPAIR_WHEEL_COMMAND: ""
397+
CIBW_TEST_EXTRAS: "lint,test,docs"
398+
CIBW_BEFORE_TEST: >
399+
cd {project} &&
400+
cp build/lib*/rbcl/_sodium.py src/rbcl/_sodium.py &&
401+
pip3 install pystache~=0.6 setuptools &&
402+
apk add wget &&
403+
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz &&
404+
mv libsodium-1.0.18.tar.gz src/rbcl/libsodium.tar.gz
405+
CIBW_TEST_COMMAND: >
406+
cd {project} &&
407+
python -m pylint rbcl src/rbcl/_sodium.tmpl src/rbcl/_sodium_build.py --disable=duplicate-code &&
408+
python src/rbcl/rbcl.py -v &&
409+
python -m pytest &&
410+
cd docs &&
411+
sphinx-apidoc -f -E --templatedir=_templates -o _source .. ../src/rbcl/_sodium_build.py ** &&
412+
make html
413+
CIBW_DEBUG_TRACEBACK: True
414+
415+
steps:
416+
- uses: actions/checkout@v4
417+
418+
- name: Build wheels
419+
uses: pypa/cibuildwheel@v2.20.0
420+
with:
421+
output-dir: dist
422+
423+
- name: Upload wheels
424+
uses: actions/upload-artifact@v4
425+
with:
426+
name: rbcl-${{ github.ref_name }}-${{ matrix.python.abi }}-musllinux_1_2_x86_64
427+
path: dist/*.whl

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ where=src
2828

2929
[options.extras_require]
3030
build = setuptools>=67.6; wheel~=0.37; pystache~=0.6; build~=0.10
31-
docs = sphinx~=4.2.0; sphinx-rtd-theme~=1.0.0
31+
docs = sphinx~=5.0.0; sphinx-rtd-theme~=1.0.0
3232
test = pytest~=7.2; pytest-cov~=4.0
33-
lint = pylint~=2.17.0
33+
lint = pylint~=3.2.7
3434
coveralls = coveralls~=3.3.1
3535
publish = twine~=4.0
3636

src/rbcl/_sodium_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import tarfile
1313
import errno
1414
import urllib.request
15-
from distutils.sysconfig import get_config_vars # pylint: disable=deprecated-module
15+
from distutils.sysconfig import get_config_vars # pylint: disable=import-error,deprecated-module
1616
import pystache
1717
from setuptools.command.install import install
1818

0 commit comments

Comments
 (0)