diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3aa6b46..59170f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,9 @@ jobs: - "pypy-3.10" os: ["ubuntu-latest"] include: - - os: "macos-latest" + - os: "macos-latest" # For m1 macos + python-version: "3.8" + - os: "macos-13" # for x86 macos python-version: "3.8" - os: "windows-latest" python-version: "3.8" diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0d447b5..7dc80dd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,12 @@ Changelog .. This document is user facing. Please word the changes in such a way .. that users understand how the changes affect the new version. +version 0.4.2 +----------------- ++ Fix a reference counting error that happened on module initialization and + triggered an error in the CPython debug build. ++ Fix a setup.py error that was triggered on MacOS ARM64. + version 0.4.1 ----------------- + Fix a bug where streams that were passed to gzip_ng_threaded.open where diff --git a/setup.py b/setup.py index fc336a6..7fb82b6 100644 --- a/setup.py +++ b/setup.py @@ -105,7 +105,8 @@ def build_zlib_ng(): run_args = dict(cwd=build_dir, env=build_env) if sys.platform == "darwin": # Cmake does not work properly subprocess.run([os.path.join(build_dir, "configure")], **run_args) - subprocess.run(["gmake", "libz-ng.a"], **run_args) + make_program = "gmake" if shutil.which("gmake") else "make" + subprocess.run([make_program, "libz-ng.a"], **run_args) elif sys.platform == "linux": subprocess.run([os.path.join(build_dir, "configure")], **run_args) subprocess.run(["make", "libz-ng.a", "-j", str(cpu_count)], **run_args) @@ -123,7 +124,7 @@ def build_zlib_ng(): setup( name="zlib-ng", - version="0.4.1", + version="0.4.2", description="Drop-in replacement for zlib and gzip modules using zlib-ng", author="Leiden University Medical Center", author_email="r.h.p.vorderman@lumc.nl", # A placeholder for now diff --git a/src/zlib_ng/__init__.py b/src/zlib_ng/__init__.py index 53c4ac5..e696c44 100644 --- a/src/zlib_ng/__init__.py +++ b/src/zlib_ng/__init__.py @@ -5,4 +5,4 @@ # This file is part of python-zlib-ng which is distributed under the # PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2. -__version__ = "0.4.1" +__version__ = "0.4.2" diff --git a/src/zlib_ng/zlib_ngmodule.c b/src/zlib_ng/zlib_ngmodule.c index 79fa29d..f6d543d 100644 --- a/src/zlib_ng/zlib_ngmodule.c +++ b/src/zlib_ng/zlib_ngmodule.c @@ -3061,6 +3061,7 @@ PyInit_zlib_ng(void) ver = PyUnicode_FromString("1.2.12"); if (ver!= NULL) { PyModule_AddObject(m, "ZLIB_VERSION", ver); + Py_INCREF(ver); PyModule_AddObject(m, "ZLIB_RUNTIME_VERSION", ver); }