Skip to content

Commit 707b145

Browse files
authored
Merge pull request #49 from pycompression/release_0.6.0
Release 0.6.0
2 parents fecf7dd + 08476f5 commit 707b145

File tree

11 files changed

+207
-126
lines changed

11 files changed

+207
-126
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
tags:
1010
- "*"
1111

12-
1312
jobs:
1413
lint:
1514
runs-on: ubuntu-20.04
@@ -25,26 +24,14 @@ jobs:
2524
run: pip install tox
2625
- name: Lint
2726
run: tox -e lint
28-
docs:
29-
needs: lint
30-
runs-on: ubuntu-20.04
31-
steps:
32-
- uses: actions/[email protected]
33-
with:
34-
submodules: recursive
35-
- name: Set up Python 3.6
36-
uses: actions/[email protected]
37-
with:
38-
python-version: 3.6
39-
- name: Install isal
40-
run: sudo apt-get install libisal-dev
41-
- name: Install tox and upgrade setuptools and pip
42-
run: pip install --upgrade tox setuptools pip
43-
- name: Build docs
44-
run: tox -e docs
45-
env:
46-
PYTHON_ISAL_LINK_DYNAMIC: True
47-
mypy:
27+
28+
package-checks:
29+
strategy:
30+
matrix:
31+
tox_env:
32+
- docs
33+
- mypy
34+
- twine_check
4835
needs: lint
4936
runs-on: ubuntu-20.04
5037
steps:
@@ -59,38 +46,10 @@ jobs:
5946
run: sudo apt-get install libisal-dev
6047
- name: Install tox and upgrade setuptools and pip
6148
run: pip install --upgrade tox setuptools pip
62-
- name: Mypy checks
63-
run: tox -e mypy
49+
- name: Run tox -e ${{ matrix.tox_env }}
50+
run: tox -e ${{ matrix.tox_env }}
6451
env:
6552
PYTHON_ISAL_LINK_DYNAMIC: True
66-
twine_check:
67-
needs: lint
68-
runs-on: ${{ matrix.os }}
69-
strategy:
70-
matrix:
71-
python-version:
72-
- 3.6
73-
os: ["ubuntu-latest" ]
74-
steps:
75-
- uses: actions/[email protected]
76-
with:
77-
submodules: recursive
78-
- name: Set up Python ${{ matrix.python-version }}
79-
uses: actions/[email protected]
80-
with:
81-
python-version: ${{ matrix.python-version }}
82-
- name: Install build dependencies (Linux) # Yasm in pypa/manylinux images.
83-
run: sudo apt install yasm
84-
if: runner.os == 'Linux'
85-
- name: Install build dependencies (Macos)
86-
run: brew install yasm automake autoconf
87-
if: runner.os == 'macOS'
88-
- name: Install twine, cython wheel and upgrade setuptools
89-
run: pip install --upgrade twine cython wheel setuptools
90-
- name: create dists
91-
run: python setup.py sdist bdist_wheel
92-
- name: check dists
93-
run: twine check dist/*
9453

9554
test-static:
9655
needs: lint
@@ -105,7 +64,9 @@ jobs:
10564
os: ["ubuntu-latest"]
10665
include:
10766
- os: "macos-latest"
108-
python-version: 3.8
67+
python-version: 3.6
68+
- os: "windows-latest"
69+
python-version: 3.6
10970
steps:
11071
- uses: actions/[email protected]
11172
with:
@@ -120,33 +81,45 @@ jobs:
12081
run: sudo apt install yasm
12182
if: runner.os == 'Linux'
12283
- name: Install build dependencies (Macos)
123-
run: brew install yasm automake autoconf
84+
run: brew install nasm automake autoconf
12485
if: runner.os == 'macOS'
86+
- name: Set MSVC developer prompt
87+
uses: ilammy/[email protected]
88+
if: runner.os == 'Windows'
89+
- name: Install nasm (Windows)
90+
uses: ilammy/[email protected]
91+
if: runner.os == 'Windows'
12592
- name: Run tests
12693
run: tox -e py3
12794
- name: Upload coverage report
12895
uses: codecov/codecov-action@v1
12996

97+
# Test if the python-isal conda package can be build. Which is linked
98+
# dynamically to the conda isa-l package.
13099
test-dynamic:
131100
runs-on: ${{ matrix.os }}
101+
defaults:
102+
run:
103+
# This is needed for miniconda, see:
104+
# https://github.com/marketplace/actions/setup-miniconda#important.
105+
shell: bash -l {0}
132106
needs: lint
133107
strategy:
134108
matrix:
135-
python-version:
136-
- 3.6
137-
os: ["ubuntu-20.04"]
109+
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
138110
steps:
139111
- uses: actions/[email protected]
140112
with:
141113
submodules: recursive
142-
- name: Set up Python ${{ matrix.python-version }}
143-
uses: actions/setup-python@v2.2.1
114+
- name: Install miniconda.
115+
uses: conda-incubator/setup-miniconda@v2.0.1 # https://github.com/conda-incubator/setup-miniconda.
144116
with:
145-
python-version: ${{ matrix.python-version }}
146-
- name: Install isal
147-
run: sudo apt-get install libisal-dev
148-
- name: Install tox and upgrade setuptools and pip
149-
run: pip install --upgrade tox setuptools pip
117+
channels: conda-forge,defaults
118+
- name: Install requirements (universal)
119+
run: conda install isa-l python tox
120+
- name: Set MSVC developer prompt
121+
uses: ilammy/[email protected]
122+
if: runner.os == 'Windows'
150123
- name: Run tests (dynamic link)
151124
run: tox -e py3
152125
env:
@@ -155,10 +128,10 @@ jobs:
155128
deploy:
156129
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
157130
runs-on: ${{ matrix.os }}
158-
needs: [lint, docs, test-static, test-dynamic, twine_check]
131+
needs: [lint, package-checks, test-static, test-dynamic]
159132
strategy:
160133
matrix:
161-
os: [ "macos-latest", "ubuntu-latest" ]
134+
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
162135
steps:
163136
- uses: actions/[email protected]
164137
with:
@@ -168,17 +141,26 @@ jobs:
168141
- name: Install cibuildwheel twine
169142
run: python -m pip install cibuildwheel twine
170143
- name: Install build dependencies (Macos)
171-
run: brew install yasm automake autoconf
144+
run: brew install nasm automake autoconf
172145
if: runner.os == 'macOS'
146+
- name: Set MSVC developer prompt
147+
uses: ilammy/[email protected]
148+
if: runner.os == 'Windows'
149+
- name: Install nasm (Windows)
150+
uses: ilammy/[email protected]
151+
if: runner.os == 'Windows'
152+
- name: Install cibuildwheel twine wheel
153+
run: python -m pip install cibuildwheel twine wheel
173154
- name: Build wheels
174155
run: cibuildwheel --output-dir dist
175156
env:
176157
CIBW_BUILD: "cp3{6,7,8,9}-*"
177158
CIBW_SKIP: "*-win32 *-manylinux_i686" # Skip 32 bit.
178159
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
179-
# Below command fails when data is not correctly statically linked
180-
# Full tests not needed: these are done prior to building.
181-
CIBW_TEST_COMMAND: "python -c 'from isal import isal_zlib, igzip; isal_zlib.adler32(b\"bla\")'"
160+
# Fully test the build wheels again.
161+
CIBW_TEST_REQUIRES: "pytest"
162+
# Simple test that requires the project to be build correctly
163+
CIBW_TEST_COMMAND: "pytest {project}/tests/test_igzip.py"
182164
- name: Build sdist
183165
if: "runner.os == 'Linux'"
184166
run: python setup.py sdist

CHANGELOG.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ 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.6.0
11+
-----------------
12+
+ ``python -m gzip``'s behaviour has been changed since fixing bug:
13+
`bpo-43316 <https://bugs.python.org/issue43316>`_. This bug was not present
14+
in ``python -m isal.igzip`` but it handled the error differently than the
15+
solution in CPython. This is now corrected and ``python -m isal.igzip``
16+
handles the error the same as the fixed ``python -m gzip``.
17+
+ Installation on Windows is now supported. Wheels are provided for Windows as
18+
well.
19+
1020
version 0.5.0
1121
-----------------
1222
+ Fix a bug where negative integers were not allowed for the ``adler32`` and

README.rst

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
:target: https://github.com/LUMC/isal/blob/main/LICENSE
1515
:alt:
1616

17+
.. image:: https://img.shields.io/conda/pn/conda-forge/python-isal.svg
18+
:target: https://github.com/conda-forge/python-isal-feedstock
19+
:alt:
20+
1721
.. image:: https://travis-ci.com/pycompression/python-isal.svg?branch=develop
1822
:target: https://travis-ci.com/github/pycompression/python-isal
1923
:alt:
@@ -34,7 +38,7 @@ Faster zlib and gzip compatible compression and decompression
3438
by providing Python bindings for the ISA-L library.
3539

3640
This package provides Python bindings for the `ISA-L
37-
<https://github.com/intel/isa-l>`_ library. The Intel Infrastructure Storage
41+
<https://github.com/intel/isa-l>`_ library. The Intel(R) Intelligent Storage
3842
Acceleration Library (ISA-L) implements several key algorithms in `assembly
3943
language <https://en.wikipedia.org/wiki/Assembly_language>`_. This includes
4044
a variety of functions to provide zlib/gzip-compatible compression.
@@ -58,7 +62,7 @@ They can be imported as follows
5862
5963
``isal_zlib`` and ``igzip`` are meant to be used as drop in replacements so
6064
their api and functions are the same as the stdlib's modules. Except where
61-
isa-l does not support the same calls as zlib (See differences below).
65+
ISA-L does not support the same calls as zlib (See differences below).
6266

6367
A full API documentation can be found on `our readthedocs page
6468
<https://python-isal.readthedocs.io>`_.
@@ -71,12 +75,14 @@ Installation
7175
Installation with pip
7276
.....................
7377

74-
+ Linux and MacOS: ``pip install isal``. Wheels are provided, so installation should
75-
be almost instantaneous.
76-
+ Windows: Installation is not supported yet.
78+
::
7779

78-
The installation will include a staticallly linked version of isa-l. On Linux
79-
and MacOS, wheels are provided. If a wheel is not provided for your system the
80+
pip install isal
81+
82+
Installation is supported on Linux, MacOS and Windows. On x86-64 (amd64)
83+
platforms wheels are provided, so installation should be almost instantaneous.
84+
The installation will include a staticallly linked version of ISA-L.
85+
If a wheel is not provided for your system the
8086
installation will build ISA-L first in a temporary directory. Please check the
8187
`ISA-L homepage <https://github.com/intel/isa-l>`_ for the build requirements.
8288

@@ -88,7 +94,7 @@ This requires having the build requirements installed.
8894
If you wish to link
8995
dynamically against a version of libisal installed on your system use::
9096

91-
PYTHON_ISAL_LINK_DYNAMIC=true pip install isal
97+
PYTHON_ISAL_LINK_DYNAMIC=true pip install isal --no-binary isal
9298

9399
ISA-L is available in numerous Linux distro's as well as on conda via the
94100
conda-forge channel. Checkout the `ports documentation
@@ -97,9 +103,7 @@ to find out how to install it. It is important that the development headers
97103
are also installed.
98104

99105
On Debian and Ubuntu the ISA-L libraries (including the development headers)
100-
can be installed with:
101-
102-
.. code-block::
106+
can be installed with::
103107

104108
sudo apt install libisal-dev
105109

@@ -113,13 +117,11 @@ channel. When used with bioinformatics tools setting up `bioconda
113117
<http://bioconda.github.io/user/install.html#install-conda>`_
114118
provides a clear set of installation instructions for conda.
115119

116-
python-isal is available on conda-forge and can be installed with
117-
118-
.. code-block::
120+
python-isal is available on conda-forge and can be installed with::
119121

120122
conda install python-isal
121123

122-
This will automatically install the isa-l library dependency as well, since
124+
This will automatically install the ISA-L library dependency as well, since
123125
it is available on conda-forge.
124126

125127
Differences with zlib and gzip modules
@@ -129,6 +131,9 @@ Differences with zlib and gzip modules
129131
in ``isal_zlib`` and ``igzip`` this is the **lowest compression level**.
130132
This is a design choice that was inherited from the ISA-L library.
131133
+ Compression levels range from 0 to 3, not 1 to 9.
134+
+ ``igzip`` contains a class ``IGzipFile`` instead of ``GzipFile``. Since the
135+
compression levels are not compatible, a difference in naming was chosen to
136+
reflect this.
132137
+ ``zlib.Z_DEFAULT_STRATEGY``, ``zlib.Z_RLE`` etc. are exposed as
133138
``isal_zlib.Z_DEFAULT_STRATEGY``, ``isal_zlib.Z_RLE`` etc. for compatibility
134139
reasons. However, ``isal_zlib`` only supports a default strategy and will

codecov.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
comment: off
21
coverage:
32
status:
43
project:

0 commit comments

Comments
 (0)