From ec2858d79b99e81dee79fc8b71bbc8e980ddcb3c Mon Sep 17 00:00:00 2001 From: Elephant Liu Date: Tue, 8 Jul 2025 14:45:36 +0800 Subject: [PATCH] fix build wheel on PyPy 3.8 --- libmc/__init__.py | 4 ++-- setup.py | 11 +++++++++-- src/version.go | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/libmc/__init__.py b/libmc/__init__.py index f130360f..69beca7d 100644 --- a/libmc/__init__.py +++ b/libmc/__init__.py @@ -33,8 +33,8 @@ __file__ as _libmc_so_file ) -__VERSION__ = "1.4.9" -__version__ = "1.4.9" +__VERSION__ = "1.4.10" +__version__ = "1.4.10" __author__ = "mckelvin" __email__ = "mckelvin@users.noreply.github.com" __date__ = "Fri Jun 7 06:16:00 2024 +0800" diff --git a/setup.py b/setup.py index 1d3b789e..90cc6fe6 100644 --- a/setup.py +++ b/setup.py @@ -99,8 +99,15 @@ def find_version(*file_paths): "License :: OSI Approved :: BSD License", "Topic :: Software Development :: Libraries", ], - # Support for the basestring type is new in Cython 0.20. - setup_requires=["Cython >= 0.20"], + setup_requires=[ + # Support for the basestring type is new in Cython 0.20. + 'Cython >= 0.20 ; implementation_name != "pypy"', + 'Cython >= 0.20 ; implementation_name == "pypy" and python_version > "3.8"', + + # compile error in PyPy 3.8 with Cython 3.1.2 + # error: 'PyDescr_NewMember' was not declared in this scope + 'Cython >= 0.20, < 3.1; implementation_name == "pypy" and python_version <= "3.8"', + ], ext_modules=[ Extension( "libmc._client", diff --git a/src/version.go b/src/version.go index b673e438..ca6c8038 100644 --- a/src/version.go +++ b/src/version.go @@ -1,6 +1,6 @@ package golibmc -const _Version = "1.4.9" +const _Version = "1.4.10" const _Author = "mckelvin" const _Email = "mckelvin@users.noreply.github.com" const _Date = "Fri Jun 7 06:16:00 2024 +0800"