Skip to content

Commit 4ebd0ce

Browse files
authored
Merge pull request #32 from adobe-type-tools/fix-arm64
Add Linux arm64 support and require Python 3.10+
2 parents 92fea79 + c64587b commit 4ebd0ce

File tree

4 files changed

+45
-17
lines changed

4 files changed

+45
-17
lines changed

.github/workflows/build_wheels.yml

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
os: [ubuntu-latest, windows-latest, macos-latest]
22+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest]
2323

2424
steps:
2525
- uses: actions/checkout@v4
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/setup-python@v5
3535
name: Install Python
3636
with:
37-
python-version: '3.7'
37+
python-version: '3.12'
3838

3939
- name: Install cibuildwheel
4040
run: |
@@ -50,34 +50,58 @@ jobs:
5050
# prepare build dependencies
5151
CIBW_BEFORE_ALL_LINUX: |
5252
git config --global url.https://github.com/.insteadOf git://github.com/
53-
yum install -y libuuid-devel
53+
dnf install -y libuuid-devel
5454
# make sure afdko submodule is not "dirty" before starting a new build
5555
CIBW_BEFORE_BUILD: "git submodule foreach git clean -fdx"
56-
# The embedded 'tx' C executable is independent of Python ABI so we only need to build it once.
57-
# Here we choose the minimum supported version, i.e. Python 3.7
58-
CIBW_BUILD: "cp37-* cp38-macosx_universal2"
59-
# build using the manylinux2014 image to ensure manylinux2014 wheels are produced
60-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
56+
# The embedded 'tx' C executable is independent of Python ABI, but we build
57+
# and test for all supported Python versions (3.10+).
58+
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*"
59+
# build using the manylinux_2_28 image
60+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
61+
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
6162
# Only build Universal2 on Mac
6263
CIBW_ARCHS_MACOS: universal2
6364
CIBW_ENVIRONMENT_MACOS: "CFLAGS='-arch arm64 -arch x86_64' CXXFLAGS='-arch arm64 -arch x86_64' LDFLAGS='-arch arm64 -arch x86_64'"
64-
# skip PyPy (no manylinux2014), 32-bit linux, musl linux, and other architectures
65-
CIBW_SKIP: "pp* cp*manylinux_i686 cp*manylinux_aarch64 cp*manylinux_ppc64le cp*manylinux_s390x *-musllinux*"
65+
# skip PyPy, 32-bit linux, musl linux, and unsupported architectures
66+
CIBW_SKIP: "pp* cp*manylinux_i686 cp*manylinux_ppc64le cp*manylinux_s390x *-musllinux*"
6667
# Force static link of libxml2
6768
CIBW_ENVIRONMENT: "FORCE_BUILD_LIBXML2=ON"
6869
CIBW_TEST_REQUIRES: "pytest"
6970
# run test suite with pytest, no coverage
7071
# TODO: run with coverage and publish to codecov.io
7172
CIBW_TEST_COMMAND: "pytest {project}/tests"
7273

73-
- uses: actions/upload-artifact@v3
74+
- uses: actions/upload-artifact@v4
7475
with:
75-
name: cffsubr-dist
76+
name: cffsubr-dist-${{ matrix.os }}
7677
path: ./dist
7778

79+
publish:
80+
name: Publish to PyPI
81+
needs: build_wheels
82+
runs-on: ubuntu-latest
83+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
84+
85+
steps:
86+
- uses: actions/checkout@v4
87+
with:
88+
fetch-depth: 0 # unshallow fetch for setuptools-scm
89+
submodules: recursive
90+
91+
- uses: actions/setup-python@v5
92+
name: Install Python
93+
with:
94+
python-version: '3.12'
95+
7896
- name: Build sdist
7997
run: pipx run build --sdist
80-
if: matrix.os == 'ubuntu-latest' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
98+
99+
- name: Download all artifacts
100+
uses: actions/download-artifact@v4
101+
with:
102+
pattern: cffsubr-dist-*
103+
merge-multiple: true
104+
path: ./dist
81105

82106
- name: Publish package to PyPI
83107
run: |
@@ -86,4 +110,3 @@ jobs:
86110
env:
87111
TWINE_USERNAME: __token__
88112
TWINE_PASSWORD: ${{ secrets.pypi_password }}
89-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

external/afdko

Submodule afdko updated 232 files

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def build_extension(self, ext):
111111
"fontTools >= 4.10.2",
112112
],
113113
extras_require={"testing": ["pytest"]},
114-
python_requires=">=3.7",
114+
python_requires=">=3.10",
115115
classifiers=[
116116
"Development Status :: 5 - Production/Stable",
117117
"Environment :: Console",
@@ -122,6 +122,11 @@ def build_extension(self, ext):
122122
"Natural Language :: English",
123123
"Operating System :: OS Independent",
124124
"Programming Language :: Python :: 3",
125+
"Programming Language :: Python :: 3.10",
126+
"Programming Language :: Python :: 3.11",
127+
"Programming Language :: Python :: 3.12",
128+
"Programming Language :: Python :: 3.13",
129+
"Programming Language :: Python :: 3.14",
125130
"Topic :: Text Processing :: Fonts",
126131
"Topic :: Multimedia :: Graphics",
127132
],

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py3{7,8,9,10,11,12}-cov, htmlcov
2+
envlist = py3{10,11,12,13,14}-cov, htmlcov
33
skip_missing_interpreters=true
44

55
[testenv]

0 commit comments

Comments
 (0)