From ba99bf98f0f1e775efb6fb52bad3bde971582834 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Tue, 3 Nov 2026 10:52:46 +0100 Subject: [PATCH 1/3] Update included zlib-ng distribution to 2.3.3. --- CHANGELOG.rst | 1 + src/zlib_ng/zlib-ng | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8a481e4..e30b5ea 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,7 @@ Changelog version 1.0.1-dev ----------------- ++ Update included zlib-ng distribution to 2.3.3. + Fix ``gzip_ng_threaded`` writers that waited forever when writing to the underlying file failed, for example, because the disk was full. A later call to ``write()``, ``flush()``, or ``close()`` raises the error. After an error, diff --git a/src/zlib_ng/zlib-ng b/src/zlib_ng/zlib-ng index 4254390..1273109 160000 --- a/src/zlib_ng/zlib-ng +++ b/src/zlib_ng/zlib-ng @@ -1 +1 @@ -Subproject commit 425439062b114a0f6cf625022c41d929c7e879f9 +Subproject commit 12731092979c6d07f42da27da673a9f6c7b13586 From cba2a3ec766164b71ecc1d386c10d44629435232 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Tue, 3 Nov 2026 11:44:21 +0100 Subject: [PATCH 2/3] Use Cmake always --- .github/workflows/ci.yml | 2 +- setup.py | 20 ++++++-------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index abb29d4..2157921 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: with: arch: ${{ matrix.os == 'windows-11-arm' && 'arm64' || 'x64' }} - name: Install build dependencies (MacOS) - run: brew install make + run: brew install cmake if: runner.os == 'macOS' - name: Run tests run: tox diff --git a/setup.py b/setup.py index f58cbf8..6884e85 100644 --- a/setup.py +++ b/setup.py @@ -103,20 +103,12 @@ def build_zlib_ng(): build_env["CFLAGS"] = build_env.get("CFLAGS", "") + " -fPIC" # Add -fPIC flag to allow static compilation 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) - 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) - else: - subprocess.run(["cmake", build_dir], **run_args) - # Do not create test suite and do not perform tests to shorten build times. - # There is no need when stable releases of zlib-ng are used. - subprocess.run(["cmake", "--build", build_dir, "--config", "Release", - "--target", "zlibstatic", - "-j", str(cpu_count)], **run_args) + subprocess.run(["cmake", build_dir], **run_args) + # Do not create test suite and do not perform tests to shorten build times. + # There is no need when stable releases of zlib-ng are used. + subprocess.run(["cmake", "--build", build_dir, "--config", "Release", + "--target", "zlib-ng-static", + "-j", str(cpu_count)], **run_args) if BUILD_CACHE: BUILD_CACHE_FILE.write_text(build_dir) return build_dir From 2f87f7fed57313b93b37612dd5028ef4bf2ddc92 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Tue, 3 Nov 2026 11:46:32 +0100 Subject: [PATCH 3/3] Build macos with make --- .github/workflows/ci.yml | 2 +- setup.py | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2157921..abb29d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: with: arch: ${{ matrix.os == 'windows-11-arm' && 'arm64' || 'x64' }} - name: Install build dependencies (MacOS) - run: brew install cmake + run: brew install make if: runner.os == 'macOS' - name: Run tests run: tox diff --git a/setup.py b/setup.py index 6884e85..6d9f267 100644 --- a/setup.py +++ b/setup.py @@ -103,12 +103,17 @@ def build_zlib_ng(): build_env["CFLAGS"] = build_env.get("CFLAGS", "") + " -fPIC" # Add -fPIC flag to allow static compilation run_args = dict(cwd=build_dir, env=build_env) - subprocess.run(["cmake", build_dir], **run_args) - # Do not create test suite and do not perform tests to shorten build times. - # There is no need when stable releases of zlib-ng are used. - subprocess.run(["cmake", "--build", build_dir, "--config", "Release", - "--target", "zlib-ng-static", - "-j", str(cpu_count)], **run_args) + if sys.platform == "darwin": # Cmake does not work properly + subprocess.run([os.path.join(build_dir, "configure")], **run_args) + make_program = "gmake" if shutil.which("gmake") else "make" + subprocess.run([make_program, "libz-ng.a"], **run_args) + else: + subprocess.run(["cmake", build_dir], **run_args) + # Do not create test suite and do not perform tests to shorten build times. + # There is no need when stable releases of zlib-ng are used. + subprocess.run(["cmake", "--build", build_dir, "--config", "Release", + "--target", "zlib-ng-static", + "-j", str(cpu_count)], **run_args) if BUILD_CACHE: BUILD_CACHE_FILE.write_text(build_dir) return build_dir