Skip to content

Commit 85d8c67

Browse files
authored
Merge pull request #6 from hpc4cmb/libflac_update
Update libflac in wheels to 1.5.0
2 parents 4398e68 + 1d9bf50 commit 85d8c67

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+161
-294
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 132 deletions
This file was deleted.

.github/workflows/wheels.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11

2-
name: Test Binary Wheels
2+
name: Binary Wheels
33

4-
on: workflow_dispatch
4+
on:
5+
workflow_dispatch:
6+
release:
7+
types: [ published ]
58

69
concurrency:
710
group: ${{ github.workflow }}-${{ github.ref }}
@@ -109,5 +112,21 @@ jobs:
109112
110113
- uses: actions/upload-artifact@v4
111114
with:
112-
name: wheels_cp${{ matrix.python }}-${{ matrix.builder }}_${{ matrix.arch }}
115+
name: flacarray-cp${{ matrix.python }}-${{ matrix.builder }}_${{ matrix.arch }}
113116
path: ./wheelhouse/flacarray*cp${{ matrix.python }}-${{ matrix.builder }}*${{ matrix.arch }}*.whl
117+
118+
upload_pypi:
119+
needs: build_wheels
120+
runs-on: ubuntu-latest
121+
permissions:
122+
id-token: write
123+
if: github.event_name == 'release' && github.event.action == 'published'
124+
steps:
125+
- uses: actions/download-artifact@v4
126+
with:
127+
# Unpacks all artifacts into dist/
128+
pattern: flacarray-*
129+
path: dist
130+
merge-multiple: true
131+
132+
- uses: pypa/gh-action-pypi-publish@release/v1

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ libflac = dependency('flac', version: '>= 1.4.0', static: false)
1414

1515
py = import('python').find_installation(pure: false)
1616

17-
subdir('flacarray')
17+
subdir('src')

packaging/pip_build_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ cmake
22
cython
33
meson
44
meson-python
5+
numpy
56
h5py
67
zarr

packaging/wheels/install_deps_linux.sh

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,11 @@ pip install --upgrade pip
3535
# Install a couple of base packages that are always required
3636
pip install -v cmake wheel
3737

38-
# In order to maximize ABI compatibility with numpy, build with the newest numpy
39-
# version containing the oldest ABI version compatible with the python we are using.
40-
# NOTE: for now, we build with numpy 2.0.x, which is backwards compatible with
41-
# numpy-1.x and forward compatible with numpy-2.x.
38+
# Python major/minor version
4239
pyver=$(python3 --version 2>&1 | awk '{print $2}' | sed -e "s#\(.*\)\.\(.*\)\..*#\1.\2#")
43-
# if [ ${pyver} == "3.8" ]; then
44-
# numpy_ver="1.20"
45-
# fi
46-
# if [ ${pyver} == "3.9" ]; then
47-
# numpy_ver="1.20"
48-
# fi
49-
# if [ ${pyver} == "3.10" ]; then
50-
# numpy_ver="1.22"
51-
# fi
52-
# if [ ${pyver} == "3.11" ]; then
53-
# numpy_ver="1.24"
54-
# fi
55-
numpy_ver="2.0.1"
5640

5741
# Install build requirements.
58-
CC="${CC}" CFLAGS="${CFLAGS}" pip install -v -r "${scriptdir}/../pip_build_requirements.txt" "numpy==${numpy_ver}"
42+
CC="${CC}" CFLAGS="${CFLAGS}" pip install -v -r "${scriptdir}/../pip_build_requirements.txt"
5943

6044
# Build compiled dependencies
6145

@@ -66,7 +50,7 @@ export STATIC="${static}"
6650
export SHLIBEXT="so"
6751
export CLEANUP=yes
6852

69-
flac_version=1.4.3
53+
flac_version=1.5.0
7054
flac_dir=flac-${flac_version}
7155
flac_pkg=${flac_dir}.tar.gz
7256

packaging/wheels/install_deps_osx.sh

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,27 +62,11 @@ pip install --upgrade pip
6262
# Install a couple of base packages that are always required
6363
pip install -v wheel
6464

65-
# In order to maximize ABI compatibility with numpy, build with the newest numpy
66-
# version containing the oldest ABI version compatible with the python we are using.
67-
# NOTE: for now, we build with numpy 2.0.x, which is backwards compatible with
68-
# numpy-1.x and forward compatible with numpy-2.x.
65+
# Python major / minor version
6966
pyver=$(python3 --version 2>&1 | awk '{print $2}' | sed -e "s#\(.*\)\.\(.*\)\..*#\1.\2#")
70-
# if [ ${pyver} == "3.8" ]; then
71-
# numpy_ver="1.20"
72-
# fi
73-
# if [ ${pyver} == "3.9" ]; then
74-
# numpy_ver="1.24"
75-
# fi
76-
# if [ ${pyver} == "3.10" ]; then
77-
# numpy_ver="1.24"
78-
# fi
79-
# if [ ${pyver} == "3.11" ]; then
80-
# numpy_ver="1.24"
81-
# fi
82-
numpy_ver="2.0.1"
8367

8468
# Install build requirements.
85-
CC="${CC}" CFLAGS="${CFLAGS}" pip install -v -r "${scriptdir}/../pip_build_requirements.txt" "numpy==${numpy_ver}"
69+
CC="${CC}" CFLAGS="${CFLAGS}" pip install -v -r "${scriptdir}/../pip_build_requirements.txt"
8670

8771
# Build compiled dependencies
8872

@@ -91,7 +75,7 @@ export STATIC=no
9175
export SHLIBEXT="dylib"
9276
export CLEANUP=yes
9377

94-
flac_version=1.4.3
78+
flac_version=1.5.0
9579
flac_dir=flac-${flac_version}
9680
flac_pkg=${flac_dir}.tar.gz
9781

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# a BSD-style license that can be found in the LICENSE file.
44

55
import copy
6-
import logging
76

87
import numpy as np
98

@@ -12,11 +11,10 @@
1211
from .hdf5 import write_compressed as hdf5_write_compressed
1312
from .hdf5 import read_compressed as hdf5_read_compressed
1413
from .mpi import global_bytes, global_array_properties
14+
from .utils import log
1515
from .zarr import write_compressed as zarr_write_compressed
1616
from .zarr import read_compressed as zarr_read_compressed
1717

18-
log = logging.getLogger("flacarray")
19-
2018

2119
class FlacArray:
2220
"""FLAC compressed array representation.

0 commit comments

Comments
 (0)