Skip to content

Release 0.4.0 #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
605a2d3
Update version number
rhpvorderman Jan 19, 2021
190d713
Add macos to ci.yml
rhpvorderman Jan 20, 2021
b9dfdae
Fix syntax
rhpvorderman Jan 20, 2021
81bd5ba
Install dependencies on mac
rhpvorderman Jan 20, 2021
ab7e8aa
Allow cpu counting on multiple platforms
rhpvorderman Jan 20, 2021
23f8f2f
Update installation instructions
rhpvorderman Jan 20, 2021
d9f70fe
Update changelog with setup.py changes
rhpvorderman Jan 20, 2021
3f01c95
Merge pull request #30 from pycompression/macos
rhpvorderman Jan 22, 2021
d11d4ed
Simplify build matrix
rhpvorderman Jan 25, 2021
4430d84
Add build action
rhpvorderman Jan 25, 2021
25d04c9
Quote expression
rhpvorderman Jan 25, 2021
3ae7a05
Install build dependencies
rhpvorderman Jan 25, 2021
264c94d
Only check wheels on linux
rhpvorderman Jan 25, 2021
a724533
Smaller build matrix
rhpvorderman Jan 25, 2021
00138fe
Typo
rhpvorderman Jan 25, 2021
7da027d
Remove unnecessary steps, replace brew with conda
rhpvorderman Jan 25, 2021
845b73d
Use sudo conda
rhpvorderman Jan 25, 2021
261cda8
use brew instead of conda
rhpvorderman Jan 25, 2021
30647cd
Correct identifiers
rhpvorderman Jan 25, 2021
6887b20
Only build cpython builds
rhpvorderman Jan 26, 2021
fd3cec0
Install build dependencies
rhpvorderman Jan 26, 2021
ec24211
Skip 32-bit builds
rhpvorderman Jan 26, 2021
c9f2086
Correct path
rhpvorderman Jan 26, 2021
d5a5c13
Default to manylinux 2014
rhpvorderman Jan 26, 2021
324b8fe
Add tests on each platform for the wheels
rhpvorderman Jan 26, 2021
6a52534
Add simple test command
rhpvorderman Jan 26, 2021
def8d91
Add pypi steps
rhpvorderman Jan 26, 2021
4a78698
Quote if statement
rhpvorderman Jan 26, 2021
b1f213b
Only deploy on a tag
rhpvorderman Jan 26, 2021
d30f5c3
Update readme
rhpvorderman Jan 27, 2021
f90f6f3
Update changelog
rhpvorderman Jan 27, 2021
69dd25b
Remove redundant build wheels shell script
rhpvorderman Jan 27, 2021
4b446bb
Merge pull request #32 from pycompression/cibuildwheels
rhpvorderman Jan 27, 2021
5752b7f
Set version to alpha
rhpvorderman Jan 27, 2021
cde9016
Use simple twine upload
rhpvorderman Jan 27, 2021
b0b6590
Update alpha version
rhpvorderman Jan 27, 2021
9ee5deb
Set stable version number
rhpvorderman Jan 27, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 113 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
branches:
- develop
- main
tags:
- "*"


jobs:
Expand Down Expand Up @@ -42,19 +44,78 @@ jobs:
run: tox -e docs
env:
PYTHON_ISAL_LINK_DYNAMIC: True
test:
runs-on: ubuntu-20.04
twine_check:
needs: lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version:
- 3.6
os: ["ubuntu-latest" ]
steps:
- uses: actions/checkout@v2.3.4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.2.1
with:
python-version: ${{ matrix.python-version }}
- name: Install build dependencies (Linux) # Yasm in pypa/manylinux images.
run: sudo apt install yasm
if: runner.os == 'Linux'
- name: Install build dependencies (Macos)
run: brew install yasm automake autoconf
if: runner.os == 'macOS'
- name: Install twine, cython wheel and upgrade setuptools
run: pip install --upgrade twine cython wheel setuptools
- name: create dists
run: python setup.py sdist bdist_wheel
- name: check dists
run: twine check dist/*

test-static:
needs: lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
linking_method:
- static
- dynamic
os: ["ubuntu-latest"]
include:
- os: "macos-latest"
python-version: 3.8
steps:
- uses: actions/checkout@v2.3.4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.2.1
with:
python-version: ${{ matrix.python-version }}
- name: Install tox and upgrade setuptools
run: pip install --upgrade tox setuptools
- name: Install build dependencies (Linux) # Yasm in pypa/manylinux images.
run: sudo apt install yasm
if: runner.os == 'Linux'
- name: Install build dependencies (Macos)
run: brew install yasm automake autoconf
if: runner.os == 'macOS'
- name: Run tests
run: tox -e py3
- name: Upload coverage report
uses: codecov/codecov-action@v1

test-dynamic:
runs-on: ${{ matrix.os }}
needs: lint
strategy:
matrix:
python-version:
- 3.6
os: ["ubuntu-20.04"]
steps:
- uses: actions/checkout@v2.3.4
with:
Expand All @@ -63,22 +124,56 @@ jobs:
uses: actions/setup-python@v2.2.1
with:
python-version: ${{ matrix.python-version }}
- name: Install tox and upgrade setuptools and pip
run: pip install --upgrade tox setuptools pip
- name: Install isal
if: ${{ matrix.linking_method == 'dynamic' }}
run: sudo apt-get install libisal-dev
- name: Install yasm # Yasm in pypa/manylinux images.
run: sudo apt install yasm
if: ${{ matrix.linking_method == 'static' }}
- name: Install tox and upgrade setuptools and pip
run: pip install --upgrade tox setuptools pip
- name: Run tests (dynamic link)
run: tox -e py3
env:
PYTHON_ISAL_LINK_DYNAMIC: True
if: ${{ matrix.linking_method == 'dynamic' }}
- name: Run tests (dynamic link)
run: tox -e py3
if: ${{ matrix.linking_method == 'static' }}
- name: Upload coverage report
if: ${{ matrix.python-version == 3.6 && matrix.linking_method == 'static'}} # Only upload coverage once
uses: codecov/codecov-action@v1

deploy:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ${{ matrix.os }}
needs: [lint, docs, test-static, test-dynamic, twine_check]
strategy:
matrix:
os: [ "macos-latest", "ubuntu-latest" ]
steps:
- uses: actions/checkout@v2.3.4
with:
submodules: recursive
- uses: actions/setup-python@v2
name: Install Python
- name: Install cibuildwheel twine
run: python -m pip install cibuildwheel twine
- name: Install build dependencies (Macos)
run: brew install yasm automake autoconf
if: runner.os == 'macOS'
- name: Build wheels
run: cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp3{6,7,8,9}-*"
CIBW_SKIP: "*-win32 *-manylinux_i686" # Skip 32 bit.
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
# Below command fails when data is not correctly statically linked
# Full tests not needed: these are done prior to building.
CIBW_TEST_COMMAND: "python -c 'from isal import isal_zlib, igzip; isal_zlib.adler32(b\"bla\")'"
- name: Build sdist
if: "runner.os == 'Linux'"
run: python setup.py sdist
- name: Publish package to TestPyPI
# pypa/gh-action-pypi-publish@master does not work on OSX
# Alpha, Beta and dev releases contain a - in the tag.
if: contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')
run: twine upload --repository-url https://test.pypi.org/legacy/ dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
- name: Publish package to PyPI
if: "!contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')"
run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ 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.4.0
-----------------
+ Move wheel building to cibuildwheel on github actions CI. Wheels are now
provided for Mac OS as well.
+ Make a tiny change in setup.py so python-isal can be build on Mac OS X.

version 0.3.0
-----------------
+ Set included ISA-L library at version 2.30.0.
Expand Down
14 changes: 8 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,21 @@ Installation
------------
Installation with pip
.....................
Python-isal can be installed with::

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

This will include a staticallly linked version of isa-l. On Linux, wheels
are provided. If a wheel is not provided for your system the installation will
build ISA-L first in a temporary directory. Please check the `ISA-L homepage
<https://github.com/intel/isa-l>`_ for the build requirements.
The installation will include a staticallly linked version of isa-l. On Linux
and MacOS, wheels are provided. If a wheel is not provided for your system the
installation will build ISA-L first in a temporary directory. Please check the
`ISA-L homepage <https://github.com/intel/isa-l>`_ for the build requirements.

The latest development version of python-isal can be installed with::

pip install git+https://github.com/rhpvorderman/python-isal.git

This requires having the build requirements installed.
If you wish to link
dynamically against a version of libisal installed on your system use::

Expand Down
50 changes: 0 additions & 50 deletions buildwheels.sh

This file was deleted.

11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,15 @@ def build_isa_l():
build_env = os.environ.copy()
# Add -fPIC flag to allow static compilation
build_env["CFLAGS"] = build_env.get("CFLAGS", "") + " -fPIC"

if hasattr(os, "sched_getaffinity"):
cpu_count = len(os.sched_getaffinity(0))
else: # sched_getaffinity not available on all platforms
cpu_count = os.cpu_count() or 1 # os.cpu_count() can return None
run_args = dict(cwd=build_dir, env=build_env)
subprocess.run(os.path.join(build_dir, "autogen.sh"), **run_args)
subprocess.run([os.path.join(build_dir, "configure"),
"--prefix", temp_prefix], **run_args)
subprocess.run(["make", "-j", str(len(os.sched_getaffinity(0)))],
subprocess.run(["make", "-j", str(cpu_count)],
**run_args)
subprocess.run(["make", "install"], **run_args)
shutil.rmtree(build_dir)
Expand All @@ -111,7 +114,7 @@ def build_isa_l():

setup(
name="isal",
version="0.3.0",
version="0.4.0",
description="Faster zlib and gzip compatible compression and "
"decompression by providing python bindings for the isa-l "
"library.",
Expand Down Expand Up @@ -142,6 +145,8 @@ def build_isa_l():
"Development Status :: 3 - Alpha",
"Topic :: System :: Archiving :: Compression",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS"
],
python_requires=">=3.6",
ext_modules=[
Expand Down
2 changes: 1 addition & 1 deletion src/isal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
"__version__"
]

__version__ = "0.3.0"
__version__ = "0.4.0"