From a611b17cf0e587bc4f5050da06bf49735d43b0e6 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Tue, 1 Nov 2022 20:25:34 -0500 Subject: [PATCH 1/2] Attempt to fix PyPy/CPython 3.8+ compatibility --- aggdraw.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/aggdraw.cxx b/aggdraw.cxx index ed13af6..0338322 100644 --- a/aggdraw.cxx +++ b/aggdraw.cxx @@ -170,7 +170,11 @@ static PyTypeObject DrawType = { "Draw", sizeof(DrawObject), 0, /* methods */ (destructor) draw_dealloc, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 (printfunc)0, /* tp_print */ +#else + (Py_ssize_t)0, /* tp_vectorcall_offset */ +#endif (getattrfunc)draw_getattr, /* tp_getattr */ 0, /* tp_setattr */ }; @@ -263,7 +267,11 @@ static PyTypeObject FontType = { "Font", sizeof(FontObject), 0, /* methods */ (destructor) font_dealloc, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 (printfunc)0, /* tp_print */ +#else + (Py_ssize_t)0, /* tp_vectorcall_offset */ +#endif 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_reserved */ @@ -304,7 +312,11 @@ static PyTypeObject PathType = { "Path", sizeof(PathObject), 0, /* methods */ (destructor) path_dealloc, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 (printfunc)0, /* tp_print */ +#else + (Py_ssize_t)0, /* tp_vectorcall_offset */ +#endif 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_reserved */ From 8f15b5057e7f3446bfa42eb0883c648c73680c98 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Tue, 1 Nov 2022 20:30:54 -0500 Subject: [PATCH 2/2] Enable PyPy wheel builds --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a21023d..e00d1ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: env: CIBW_TEST_COMMAND: python {project}/selftest.py CIBW_BEFORE_BUILD_LINUX: yum install -y freetype-devel - CIBW_SKIP: pp* *-musllinux* + CIBW_SKIP: "*-musllinux*" CIBW_TEST_REQUIRES: numpy pillow pytest CIBW_ARCHS_LINUX: auto aarch64 run: |