diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16420fe..3aa6b46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,10 +19,10 @@ jobs: - uses: actions/checkout@v2.3.4 with: submodules: recursive - - name: Set up Python 3.7 + - name: Set up Python 3.8 uses: actions/setup-python@v2.2.1 with: - python-version: 3.7 + python-version: "3.8" - name: Install tox run: pip install tox - name: Lint @@ -39,10 +39,10 @@ jobs: - uses: actions/checkout@v2.3.4 with: submodules: recursive - - name: Set up Python 3.7 + - name: Set up Python 3.8 uses: actions/setup-python@v2.2.1 with: - python-version: 3.7 + python-version: 3.8 - name: Install tox and upgrade setuptools and pip run: pip install --upgrade tox setuptools pip - name: Run tox -e ${{ matrix.tox_env }} @@ -53,20 +53,19 @@ jobs: strategy: matrix: python-version: - - "3.7" - "3.8" - "3.9" - "3.10" - "3.11" - - "pypy-3.7" - - "pypy-3.8" + - "3.12" - "pypy-3.9" + - "pypy-3.10" os: ["ubuntu-latest"] include: - os: "macos-latest" - python-version: 3.7 + python-version: "3.8" - os: "windows-latest" - python-version: 3.7 + python-version: "3.8" steps: - uses: actions/checkout@v2.3.4 with: @@ -106,7 +105,7 @@ jobs: distro: ${{ matrix.distro }} install: | apt-get update -q -y - apt-get install -q -y python3 python3-pip tox cmake + apt-get install -q -y python3 python3-pip tox cmake git googletest run: | tox diff --git a/.readthedocs.yml b/.readthedocs.yml index 20eb6cd..cb71cd8 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,15 +1,20 @@ version: 2 formats: [] # Do not build epub and pdf -# This adds mambaforge for the installation +python: + install: + - requirements: "requirements-docs.txt" + - method: "pip" + path: "." + +sphinx: + configuration: docs/conf.py + build: - os: "ubuntu-20.04" + os: "ubuntu-22.04" tools: - python: "mambaforge-4.10" + python: "3" -python: - install: - - method: pip - path: . -conda: - environment: docs/conda-environment.yml \ No newline at end of file +# Make sure zlib-ng is cloned alongside +submodules: + include: all diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f726b1f..a4eaa79 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,24 @@ 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.3.0 +----------------- ++ 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 ++ Update embedded zlib-ng version to 2.1.5. This comes with some speed + improvements and changes with regards to the compression levels. Also + several bugs were fixed. For full + details checkout the `zlib-ng 2.1.2 release notes + `_ as well as + those for the bugfix releases `2.1.3 + `_, + `2.1.4 `_ and + `2.1.5 `_. + + version 0.2.0 ----------------- + Update embedded zlib-ng version to 2.0.7 @@ -18,4 +36,4 @@ version 0.1.0 + Add a fully featured gzip application in python m zlib_ng.gzip_ng. + Port Cpython's gzip module to use zlib-ng. + Port CPython's zlib module to use zlib-ng. -+ Use zlib-ng version 2.0.6 as included statically linked version. \ No newline at end of file ++ Use zlib-ng version 2.0.6 as included statically linked version. diff --git a/setup.py b/setup.py index 3049718..e322e1c 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,8 @@ ZLIB_NG_SOURCE = os.path.join("src", "zlib_ng", "zlib-ng") SYSTEM_IS_UNIX = (sys.platform.startswith("linux") or - sys.platform.startswith("darwin")) + sys.platform.startswith("darwin") or + 'bsd' in sys.platform) SYSTEM_IS_WINDOWS = sys.platform.startswith("win") # Since pip builds in a temp directory by default, setting a fixed file in @@ -38,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] @@ -107,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. @@ -121,7 +123,7 @@ def build_zlib_ng(): setup( name="zlib-ng", - version="0.2.0", + version="0.3.0", 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 @@ -141,11 +143,11 @@ def build_zlib_ng(): classifiers=[ "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: C", @@ -156,6 +158,6 @@ def build_zlib_ng(): "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", ], - python_requires=">=3.7", # uses METH_FASTCALL + python_requires=">=3.8", # Earliest version still tested. ext_modules=EXTENSIONS ) diff --git a/src/zlib_ng/__init__.py b/src/zlib_ng/__init__.py index 6f754a5..89918cc 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.2.0" +__version__ = "0.3.0" diff --git a/src/zlib_ng/zlib-ng b/src/zlib_ng/zlib-ng index a583e21..2bc6688 160000 --- a/src/zlib_ng/zlib-ng +++ b/src/zlib_ng/zlib-ng @@ -1 +1 @@ -Subproject commit a583e215afa2356e23b418efa871a1cc4348702a +Subproject commit 2bc66887ddc0c50776811a27be68e34430d665e1