diff --git a/.readthedocs.yml b/.readthedocs.yml index c6c9f8e..cb71cd8 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -14,9 +14,7 @@ build: os: "ubuntu-22.04" tools: python: "3" - apt_packages: - - python3 - - python3-pip - - cmake - - git - - googletest + +# Make sure zlib-ng is cloned alongside +submodules: + include: all 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 diff --git a/setup.py b/setup.py index d349300..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] @@ -108,6 +106,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.