Skip to content

Commit 3df49da

Browse files
authored
Merge pull request #24 from pycompression/release_0.3.0
Release 0.3.0
2 parents fedd078 + 43a9d1c commit 3df49da

File tree

6 files changed

+53
-29
lines changed

6 files changed

+53
-29
lines changed

.github/workflows/ci.yml

+9-10
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
- uses: actions/[email protected]
2020
with:
2121
submodules: recursive
22-
- name: Set up Python 3.7
22+
- name: Set up Python 3.8
2323
uses: actions/[email protected]
2424
with:
25-
python-version: 3.7
25+
python-version: "3.8"
2626
- name: Install tox
2727
run: pip install tox
2828
- name: Lint
@@ -39,10 +39,10 @@ jobs:
3939
- uses: actions/[email protected]
4040
with:
4141
submodules: recursive
42-
- name: Set up Python 3.7
42+
- name: Set up Python 3.8
4343
uses: actions/[email protected]
4444
with:
45-
python-version: 3.7
45+
python-version: 3.8
4646
- name: Install tox and upgrade setuptools and pip
4747
run: pip install --upgrade tox setuptools pip
4848
- name: Run tox -e ${{ matrix.tox_env }}
@@ -53,20 +53,19 @@ jobs:
5353
strategy:
5454
matrix:
5555
python-version:
56-
- "3.7"
5756
- "3.8"
5857
- "3.9"
5958
- "3.10"
6059
- "3.11"
61-
- "pypy-3.7"
62-
- "pypy-3.8"
60+
- "3.12"
6361
- "pypy-3.9"
62+
- "pypy-3.10"
6463
os: ["ubuntu-latest"]
6564
include:
6665
- os: "macos-latest"
67-
python-version: 3.7
66+
python-version: "3.8"
6867
- os: "windows-latest"
69-
python-version: 3.7
68+
python-version: "3.8"
7069
steps:
7170
- uses: actions/[email protected]
7271
with:
@@ -106,7 +105,7 @@ jobs:
106105
distro: ${{ matrix.distro }}
107106
install: |
108107
apt-get update -q -y
109-
apt-get install -q -y python3 python3-pip tox cmake
108+
apt-get install -q -y python3 python3-pip tox cmake git googletest
110109
run: |
111110
tox
112111

.readthedocs.yml

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
version: 2
22
formats: [] # Do not build epub and pdf
33

4-
# This adds mambaforge for the installation
4+
python:
5+
install:
6+
- requirements: "requirements-docs.txt"
7+
- method: "pip"
8+
path: "."
9+
10+
sphinx:
11+
configuration: docs/conf.py
12+
513
build:
6-
os: "ubuntu-20.04"
14+
os: "ubuntu-22.04"
715
tools:
8-
python: "mambaforge-4.10"
16+
python: "3"
917

10-
python:
11-
install:
12-
- method: pip
13-
path: .
14-
conda:
15-
environment: docs/conda-environment.yml
18+
# Make sure zlib-ng is cloned alongside
19+
submodules:
20+
include: all

CHANGELOG.rst

+19-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ Changelog
77
.. This document is user facing. Please word the changes in such a way
88
.. that users understand how the changes affect the new version.
99
10+
version 0.3.0
11+
-----------------
12+
+ Source distributions on Linux now default to building with configure and
13+
make as it is faster and has less dependencies than CMake.
14+
+ Python 3.12 support was added. Python 3.7 support was dropped as it is end
15+
of life.
16+
+ Enabled installation on BSD
17+
+ Update embedded zlib-ng version to 2.1.5. This comes with some speed
18+
improvements and changes with regards to the compression levels. Also
19+
several bugs were fixed. For full
20+
details checkout the `zlib-ng 2.1.2 release notes
21+
<https://github.com/zlib-ng/zlib-ng/releases/tag/2.1.2>`_ as well as
22+
those for the bugfix releases `2.1.3
23+
<https://github.com/zlib-ng/zlib-ng/releases/tag/2.1.3>`_,
24+
`2.1.4 <https://github.com/zlib-ng/zlib-ng/releases/tag/2.1.4>`_ and
25+
`2.1.5 <https://github.com/zlib-ng/zlib-ng/releases/tag/2.1.5>`_.
26+
27+
1028
version 0.2.0
1129
-----------------
1230
+ Update embedded zlib-ng version to 2.0.7
@@ -18,4 +36,4 @@ version 0.1.0
1836
+ Add a fully featured gzip application in python m zlib_ng.gzip_ng.
1937
+ Port Cpython's gzip module to use zlib-ng.
2038
+ Port CPython's zlib module to use zlib-ng.
21-
+ Use zlib-ng version 2.0.6 as included statically linked version.
39+
+ Use zlib-ng version 2.0.6 as included statically linked version.

setup.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
ZLIB_NG_SOURCE = os.path.join("src", "zlib_ng", "zlib-ng")
2020

2121
SYSTEM_IS_UNIX = (sys.platform.startswith("linux") or
22-
sys.platform.startswith("darwin"))
22+
sys.platform.startswith("darwin") or
23+
'bsd' in sys.platform)
2324
SYSTEM_IS_WINDOWS = sys.platform.startswith("win")
2425

2526
# Since pip builds in a temp directory by default, setting a fixed file in
@@ -38,9 +39,7 @@
3839
class BuildZlibNGExt(build_ext):
3940
def build_extension(self, ext):
4041
# Add option to link dynamically for packaging systems such as conda.
41-
# Always link dynamically on readthedocs to simplify install.
42-
if (os.getenv("PYTHON_ZLIB_NG_LINK_DYNAMIC") is not None or
43-
os.environ.get("READTHEDOCS") is not None):
42+
if os.getenv("PYTHON_ZLIB_NG_LINK_DYNAMIC") is not None:
4443
# Check for zlib_ng include directories. This is useful when
4544
# installing in a conda environment.
4645
possible_prefixes = [sys.exec_prefix, sys.base_exec_prefix]
@@ -107,6 +106,9 @@ def build_zlib_ng():
107106
if sys.platform == "darwin": # Cmake does not work properly
108107
subprocess.run([os.path.join(build_dir, "configure")], **run_args)
109108
subprocess.run(["gmake", "libz-ng.a"], **run_args)
109+
elif sys.platform == "linux":
110+
subprocess.run([os.path.join(build_dir, "configure")], **run_args)
111+
subprocess.run(["make", "libz-ng.a", "-j", str(cpu_count)], **run_args)
110112
else:
111113
subprocess.run(["cmake", build_dir], **run_args)
112114
# Do not create test suite and do not perform tests to shorten build times.
@@ -121,7 +123,7 @@ def build_zlib_ng():
121123

122124
setup(
123125
name="zlib-ng",
124-
version="0.2.0",
126+
version="0.3.0",
125127
description="Drop-in replacement for zlib and gzip modules using zlib-ng",
126128
author="Leiden University Medical Center",
127129
author_email="[email protected]", # A placeholder for now
@@ -141,11 +143,11 @@ def build_zlib_ng():
141143
classifiers=[
142144
"Programming Language :: Python :: 3 :: Only",
143145
"Programming Language :: Python :: 3",
144-
"Programming Language :: Python :: 3.7",
145146
"Programming Language :: Python :: 3.8",
146147
"Programming Language :: Python :: 3.9",
147148
"Programming Language :: Python :: 3.10",
148149
"Programming Language :: Python :: 3.11",
150+
"Programming Language :: Python :: 3.12",
149151
"Programming Language :: Python :: Implementation :: CPython",
150152
"Programming Language :: Python :: Implementation :: PyPy",
151153
"Programming Language :: C",
@@ -156,6 +158,6 @@ def build_zlib_ng():
156158
"Operating System :: MacOS",
157159
"Operating System :: Microsoft :: Windows",
158160
],
159-
python_requires=">=3.7", # uses METH_FASTCALL
161+
python_requires=">=3.8", # Earliest version still tested.
160162
ext_modules=EXTENSIONS
161163
)

src/zlib_ng/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# This file is part of python-zlib-ng which is distributed under the
66
# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2.
77

8-
__version__ = "0.2.0"
8+
__version__ = "0.3.0"

src/zlib_ng/zlib-ng

Submodule zlib-ng updated 324 files

0 commit comments

Comments
 (0)