From 5c4de4743284d89510fd6ca1946b854eb579e38c Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Fri, 22 Dec 2023 09:46:55 +0100 Subject: [PATCH 1/7] Default to configure + make on linux --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index d349300..c59614a 100644 --- a/setup.py +++ b/setup.py @@ -108,6 +108,9 @@ def build_zlib_ng(): 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) + 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. From 9c43eb57d7bee7f0c31dcdfe749fcbe3a600f7ac Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Fri, 22 Dec 2023 09:51:28 +0100 Subject: [PATCH 2/7] Remove cmake dependencies --- .readthedocs.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index c6c9f8e..41fe920 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -17,6 +17,3 @@ build: apt_packages: - python3 - python3-pip - - cmake - - git - - googletest From 1648d28673c96a7ded24f4cbefe7e9eae4ea9c6c Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Fri, 22 Dec 2023 09:53:15 +0100 Subject: [PATCH 3/7] Do not link dynamically on readthedocs --- setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index c59614a..4ce8a8d 100644 --- a/setup.py +++ b/setup.py @@ -39,9 +39,7 @@ class BuildZlibNGExt(build_ext): def build_extension(self, ext): # Add option to link dynamically for packaging systems such as conda. - # Always link dynamically on readthedocs to simplify install. - if (os.getenv("PYTHON_ZLIB_NG_LINK_DYNAMIC") is not None or - os.environ.get("READTHEDOCS") is not None): + if os.getenv("PYTHON_ZLIB_NG_LINK_DYNAMIC") is not None: # Check for zlib_ng include directories. This is useful when # installing in a conda environment. possible_prefixes = [sys.exec_prefix, sys.base_exec_prefix] From c748459dba5728b9d033cd1f6da960de206cd0f4 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Fri, 22 Dec 2023 09:53:41 +0100 Subject: [PATCH 4/7] Do not install extra apt packages on readthedocs --- .readthedocs.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 41fe920..c31989e 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -14,6 +14,3 @@ build: os: "ubuntu-22.04" tools: python: "3" - apt_packages: - - python3 - - python3-pip From abe141ed9bc007e6cacf3e2e9c79b81e1333bfab Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Fri, 22 Dec 2023 09:56:34 +0100 Subject: [PATCH 5/7] Clone zlib-ng alongside --- .readthedocs.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.readthedocs.yml b/.readthedocs.yml index c31989e..b73dcfd 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -14,3 +14,7 @@ build: os: "ubuntu-22.04" tools: python: "3" + +# Make sure zlib-ng is cloned alongside +submodules: + recursive: true From 28ec0354f533f345643893a1b2ec9548e659de98 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Fri, 22 Dec 2023 10:03:08 +0100 Subject: [PATCH 6/7] Include all submodules --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index b73dcfd..cb71cd8 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -17,4 +17,4 @@ build: # Make sure zlib-ng is cloned alongside submodules: - recursive: true + include: all From 9b3c8f9c7ab5cd9d5465a81ef35ee88aa258eb57 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Fri, 22 Dec 2023 10:09:49 +0100 Subject: [PATCH 7/7] Update changelog with Linux build change --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index aea6e2e..345059c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,8 @@ Changelog version 0.3.0-dev ----------------- ++ Source distributions on Linux now default to building with configure and + make as it is faster and has less dependencies than CMake. + Python 3.12 support was added. Python 3.7 support was dropped as it is end of life. + Enabled installation on BSD