Skip to content
Open
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Install build dependencies (Macos)
# Install yasm because nasm does not work when building wheels.
# Probably because of nasm-filter.sh not filtering all flags that can not be used.
run: brew install nasm
run: brew install nasm automake autoconf libtool coreutils
if: runner.os == 'macOS'
- name: Set MSVC developer prompt
uses: ilammy/msvc-dev-cmd@v1
Expand Down Expand Up @@ -160,14 +160,14 @@ jobs:
PYTHON_ISAL_LINK_DYNAMIC: True

deploy:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ${{ matrix.os }}
needs:
- lint
- package-checks
- test-static
- test-dynamic
- test-arch
# needs:
# - lint
# - package-checks
# - test-static
# - test-dynamic
# - test-arch
strategy:
matrix:
os:
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
- name: Install cibuildwheel twine wheel
run: python -m pip install cibuildwheel twine wheel
- name: Install build dependencies (Macos)
run: brew install nasm
run: brew install nasm automake autoconf libtool coreutils
if: runner.os == 'macOS'
- name: Set MSVC developer prompt
uses: ilammy/msvc-dev-cmd@v1
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Changelog

version 1.8.1-dev
-----------------
+ Switch back to building ISA-L using autotools as it leads to better compile
time configurations that don't skip functions specialized for the
architecture. This was hurting the MacOS arm64 build.
+ Restore PyPy wheel builds.

version 1.8.0
Expand Down
14 changes: 4 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import functools
import os
import platform
import shutil
import subprocess
import sys
Expand Down Expand Up @@ -74,7 +73,7 @@ def build_extension(self, ext):
isa_l_build_dir = build_isa_l()
if SYSTEM_IS_UNIX:
ext.extra_objects = [
os.path.join(isa_l_build_dir, "bin", "isa-l.a")]
os.path.join(isa_l_build_dir, ".libs", "libisal.a")]
elif SYSTEM_IS_WINDOWS:
ext.extra_objects = [
os.path.join(isa_l_build_dir, "isa-l_static.lib")]
Expand Down Expand Up @@ -113,17 +112,12 @@ def build_isa_l():
cpu_count = os.cpu_count() or 1 # os.cpu_count() can return None
run_args = dict(cwd=build_dir, env=build_env)
if SYSTEM_IS_UNIX:
if platform.machine() == "aarch64":
cflags_param = "CFLAGS_aarch64"
else:
cflags_param = "CFLAGS_"
make_cmd = "make"
if SYSTEM_IS_BSD:
make_cmd = "gmake"
subprocess.run([make_cmd, "-j", str(cpu_count), "-f", "Makefile.unx",
"isa-l.h", "bin/isa-l.a",
f"{cflags_param}={build_env.get('CFLAGS', '')}"],
**run_args)
subprocess.run(os.path.join(build_dir, "autogen.sh"), **run_args)
subprocess.run([os.path.join(build_dir, "configure")], **run_args)
subprocess.run([make_cmd, "-j", str(cpu_count)], **run_args)
elif SYSTEM_IS_WINDOWS:
subprocess.run(["nmake", "/f", "Makefile.nmake"], **run_args)
else:
Expand Down
6 changes: 3 additions & 3 deletions src/isal/isal_zlibmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ Comp_dealloc(compobject *self)
}

static compobject *
newcompobject()
newcompobject(void)
{
compobject *self;
self = PyObject_New(compobject, &IsalZlibCompType);
Expand Down Expand Up @@ -656,7 +656,7 @@ set_inflate_zdict(decompobject *self)
}

static decompobject *
newdecompobject()
newdecompobject(void)
{
decompobject *self;
self = PyObject_New(decompobject, &IsalZlibDecompType);
Expand Down Expand Up @@ -1664,8 +1664,8 @@ GzipReader_read_into_buffer(GzipReader *self, uint8_t *out_buffer, size_t out_bu
PyThreadState *_save;
Py_UNBLOCK_THREADS
while(1) {
size_t remaining; // Must be before labels.
switch(self->stream_phase) {
size_t remaining; // Must be before labels.
case GzipReader_HEADER:
remaining = buffer_end - current_pos;
if (remaining == 0 && self->all_bytes_read) {
Expand Down
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ commands =
python -m build
twine check dist/*

[testenv:pedantic_compile]
deps=setuptools
skip_install=True
setenv=
CFLAGS=-Wall -Werror -Wpedantic
PYTHON_ISAL_LINK_DYNAMIC=1
allowlist_externals = bash
commands =
bash -c 'CC=gcc python setup.py build_ext -f'
bash -c 'CC=clang python setup.py build_ext -f'

# Documentation should build on python version 3
[testenv:docs]
deps=-r requirements-docs.txt
Expand Down
Loading