From f70a3bbdc8163b9a5d280f510b356d6f3be62d7f Mon Sep 17 00:00:00 2001 From: Alena Chaikouskaya Date: Fri, 13 Oct 2023 18:23:56 +0200 Subject: [PATCH 01/12] Install openblas in bigendian test dockerfile With new numpy-1.26.0 our build fails on s390x as numpy wheels are not supplied but built and openblas is expected from this version [1] openblas library makes numpy somewhat faster and is available for installation, so we go for it. [1] See Numpy https://github.com/numpy/numpy/ issue 24703 --- .github/images/bigendian.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/images/bigendian.Dockerfile b/.github/images/bigendian.Dockerfile index 1fe895681..41e5f8f86 100644 --- a/.github/images/bigendian.Dockerfile +++ b/.github/images/bigendian.Dockerfile @@ -1,6 +1,6 @@ FROM s390x/debian RUN apt-get update -RUN apt-get install -y cmake g++ python3 python3-pip git python3-venv +RUN apt-get install -y cmake g++ python3 python3-pip git python3-venv libopenblas-dev #mpark variant WORKDIR /home/ci From 2472c5658fb8ecf5b9765f71006d3e9539ca18b1 Mon Sep 17 00:00:00 2001 From: Alena Chaikouskaya Date: Fri, 27 Oct 2023 16:36:06 +0200 Subject: [PATCH 02/12] Drop python 3.6 It's been well over a year since Python 3.6 EOL, everyone should have migrated away already. --- .github/workflows/wheels.yaml | 2 +- README.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index e4150e48e..ec6aa07e7 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -62,7 +62,7 @@ jobs: CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;C:/Program Files (x86)/layered-file-protocols/" CIBW_ARCHS: ${{ matrix.arch }} - CIBW_SKIP: pp* *-musllinux_* cp31*-win32 cp312-* + CIBW_SKIP: pp* *-musllinux_* cp36-* cp31*-win32 cp312-* run: | python -m cibuildwheel --output-dir wheelhouse python/ diff --git a/README.md b/README.md index 7c21a05d7..4194b32a2 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,6 @@ pip install dlisio | | macOS Intel | Windows 64bit | Windows 32bit | manylinux x86_64 | manylinux aarch64 | |---------------|----|-----|-----|----|----| -| CPython 3.6 | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.7 | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.8 | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ | @@ -97,7 +96,7 @@ To develop dlisio, or to build a particular revision from source, you need: * A C++11 compatible compiler (tested on gcc, clang, and msvc 2019) * [CMake](https://cmake.org/) version 3.5 or greater -* [Python](https://python.org) version 3.6 or greater +* [Python](https://python.org) version 3.7 or greater * [fmtlib](http://fmtlib.net/) tested mainly with 7.1.3 * [mpark_variant](https://github.com/mpark/variant) * [pybind11](https://github.com/pybind/pybind11) version 2.6 or greater From d27064cf4a14ae5df6575b09031abfc6adb54a8e Mon Sep 17 00:00:00 2001 From: Alena Chaikouskaya Date: Fri, 20 Oct 2023 13:36:37 +0200 Subject: [PATCH 03/12] Bump manylinux version Our wheels build fail for python 3.9 and later as runs now collect numpy-1.26.0 which requires newer gcc than available on manylinux2010. Thus we bump our manylinux version which has newer tools installed. --- python/pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index cd0b70ce8..ffd515d23 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -90,10 +90,6 @@ test-command = [ ] [tool.cibuildwheel.linux] -manylinux-x86_64-image = "manylinux2010" - -[[tool.cibuildwheel.overrides]] -select = "cp311*" manylinux-x86_64-image = "manylinux2014" [tool.cibuildwheel.macos] From 912079a12543fcebb1eea124a5f45dafa5eabd3c Mon Sep 17 00:00:00 2001 From: Alena Chaikouskaya Date: Fri, 27 Oct 2023 17:29:24 +0200 Subject: [PATCH 04/12] Build i686 wheels with noblas for python >= 3.9 We have a problem for i686 architecture. New 1.26.0 numpy by default require blas library. [1] And it seems like required openblas / epel package is not available for i686, so we can't use it. It doesn't seem feasible to deal with all of that, so instead we allow building without blas library. [1] See Numpy https://github.com/numpy/numpy/ issue 24703 --- python/pyproject.toml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/python/pyproject.toml b/python/pyproject.toml index ffd515d23..a257b2ee7 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -92,5 +92,25 @@ test-command = [ [tool.cibuildwheel.linux] manylinux-x86_64-image = "manylinux2014" +[[tool.cibuildwheel.overrides]] +select = "cp3{9,10,11}*i686" +before-build= [ + "python -m pip install numpy --config-settings=setup-args=\"-Dallow-noblas=true\" ", + """cmake \ + -S . \ + -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DBUILD_TESTING=OFF \ + -DBUILD_PYTHON=OFF \ + """, + """cmake \ + --build build \ + --parallel \ + --target install \ + --config Release \ + """, +] + [tool.cibuildwheel.macos] environment = { CXXFLAGS="-L/usr/local/lib" } From 091f2480839cd0ebc17a2142c7ff977a834afe1d Mon Sep 17 00:00:00 2001 From: Alena Chaikouskaya Date: Fri, 20 Oct 2023 13:38:11 +0200 Subject: [PATCH 05/12] Allow manual run of github actions --- .github/workflows/analyzers.yaml | 1 + .github/workflows/bigendian.yaml | 1 + .github/workflows/core.yaml | 1 + .github/workflows/docs.yaml | 1 + .github/workflows/wheels.yaml | 1 + 5 files changed, 5 insertions(+) diff --git a/.github/workflows/analyzers.yaml b/.github/workflows/analyzers.yaml index 50340a300..8f1957d86 100644 --- a/.github/workflows/analyzers.yaml +++ b/.github/workflows/analyzers.yaml @@ -5,6 +5,7 @@ on: branches: [master] pull_request: branches: [master] + workflow_dispatch: jobs: cppcheck: diff --git a/.github/workflows/bigendian.yaml b/.github/workflows/bigendian.yaml index 9670fb935..7a4206861 100644 --- a/.github/workflows/bigendian.yaml +++ b/.github/workflows/bigendian.yaml @@ -5,6 +5,7 @@ on: branches: [master] pull_request: branches: [master] + workflow_dispatch: jobs: bigendian: diff --git a/.github/workflows/core.yaml b/.github/workflows/core.yaml index e2e62529f..2ac9aa300 100644 --- a/.github/workflows/core.yaml +++ b/.github/workflows/core.yaml @@ -5,6 +5,7 @@ on: branches: [master] pull_request: branches: [master] + workflow_dispatch: jobs: build_core: diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index bfb9d5e80..b97bba824 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -5,6 +5,7 @@ on: branches: [master] pull_request: branches: [master] + workflow_dispatch: jobs: build_docs: diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index ec6aa07e7..9e9cfbd1e 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -7,6 +7,7 @@ on: - '*' pull_request: branches: [master] + workflow_dispatch: jobs: wheels: From 88121064094603ce57c18552f81acf930d4e149f Mon Sep 17 00:00:00 2001 From: Alena Chaikouskaya Date: Fri, 27 Oct 2023 17:07:41 +0200 Subject: [PATCH 06/12] Add missing info about i686 wheels to Readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4194b32a2..5a0bc2582 100644 --- a/README.md +++ b/README.md @@ -47,13 +47,13 @@ pip install dlisio ``` -| | macOS Intel | Windows 64bit | Windows 32bit | manylinux x86_64 | manylinux aarch64 | -|---------------|----|-----|-----|----|----| -| CPython 3.7 | ✅ | ✅ | ✅ | ✅ | ✅ | -| CPython 3.8 | ✅ | ✅ | ✅ | ✅ | ✅ | -| CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ | -| CPython 3.10 | ✅ | ✅ | - | ✅ | ✅ | -| CPython 3.11 | ✅ | ✅ | - | ✅ | ✅ | +| | macOS Intel | Windows 64bit | Windows 32bit | manylinux x86_64 | manylinux aarch64 | manylinux i686 | +|---------------|----|-----|-----|----|----|----| +| CPython 3.7 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| CPython 3.8 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| CPython 3.10 | ✅ | ✅ | - | ✅ | ✅ | ✅ | +| CPython 3.11 | ✅ | ✅ | - | ✅ | ✅ | ✅ | See [Build dlisio](#Build-dlisio) for building dlisio from source. From 2b862954c569ba3dbff1c55fe91ceb6ba8389d23 Mon Sep 17 00:00:00 2001 From: Alena Chaikouskaya Date: Fri, 27 Oct 2023 16:37:06 +0200 Subject: [PATCH 07/12] Build musllinux (alpine) x86_64 wheels We got request to build dlisio on alpine, which means there might be a need for it for our other users. However we shall build wheels only for x86_64 architecture. Building on other architectures takes ages and will probably surpass github timeouts anyway. It is also unlikely our users even need it. --- .github/workflows/wheels.yaml | 4 +++- README.md | 14 +++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index 9e9cfbd1e..c133c3af7 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -63,7 +63,9 @@ jobs: CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;C:/Program Files (x86)/layered-file-protocols/" CIBW_ARCHS: ${{ matrix.arch }} - CIBW_SKIP: pp* *-musllinux_* cp36-* cp31*-win32 cp312-* + # musllinux arch skip: unlikely someone wants to run dlisio on alpine on non-standard architecture + # musllinux cp37 and cp38 skip: latest available numpy doesn't provide musslinux wheels, so it is unlikely useful + CIBW_SKIP: pp* *-musllinux_i686 *-musllinux_aarch64 cp37*-musllinux* cp38*-musllinux* cp36-* cp31*-win32 cp312-* run: | python -m cibuildwheel --output-dir wheelhouse python/ diff --git a/README.md b/README.md index 5a0bc2582..9a792fab5 100644 --- a/README.md +++ b/README.md @@ -47,13 +47,13 @@ pip install dlisio ``` -| | macOS Intel | Windows 64bit | Windows 32bit | manylinux x86_64 | manylinux aarch64 | manylinux i686 | -|---------------|----|-----|-----|----|----|----| -| CPython 3.7 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| CPython 3.8 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| CPython 3.10 | ✅ | ✅ | - | ✅ | ✅ | ✅ | -| CPython 3.11 | ✅ | ✅ | - | ✅ | ✅ | ✅ | +| | macOS Intel | Windows 64bit | Windows 32bit | manylinux x86_64 | manylinux aarch64 | manylinux i686 | musllinux x86_64 +|---------------|----|-----|-----|----|----|----|----| +| CPython 3.7 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | - | +| CPython 3.8 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | - | +| CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| CPython 3.10 | ✅ | ✅ | - | ✅ | ✅ | ✅ | ✅ | +| CPython 3.11 | ✅ | ✅ | - | ✅ | ✅ | ✅ | ✅ | See [Build dlisio](#Build-dlisio) for building dlisio from source. From 996af11642040f21b51e8221f2ebffa7f55c667e Mon Sep 17 00:00:00 2001 From: Alena Chaikouskaya Date: Wed, 1 Nov 2023 18:32:32 +0100 Subject: [PATCH 08/12] Build wheels for python 3.12 --- .github/workflows/wheels.yaml | 2 +- README.md | 1 + python/dlisio/__init__.py | 20 +++++++++++++++----- python/pyproject.toml | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index c133c3af7..35162a4ce 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -65,7 +65,7 @@ jobs: CIBW_ARCHS: ${{ matrix.arch }} # musllinux arch skip: unlikely someone wants to run dlisio on alpine on non-standard architecture # musllinux cp37 and cp38 skip: latest available numpy doesn't provide musslinux wheels, so it is unlikely useful - CIBW_SKIP: pp* *-musllinux_i686 *-musllinux_aarch64 cp37*-musllinux* cp38*-musllinux* cp36-* cp31*-win32 cp312-* + CIBW_SKIP: pp* *-musllinux_i686 *-musllinux_aarch64 cp37*-musllinux* cp38*-musllinux* cp36-* cp31*-win32 run: | python -m cibuildwheel --output-dir wheelhouse python/ diff --git a/README.md b/README.md index 9a792fab5..39d9e35d2 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ pip install dlisio | CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.10 | ✅ | ✅ | - | ✅ | ✅ | ✅ | ✅ | | CPython 3.11 | ✅ | ✅ | - | ✅ | ✅ | ✅ | ✅ | +| CPython 3.12 | ✅ | ✅ | - | ✅ | ✅ | ✅ | ✅ | See [Build dlisio](#Build-dlisio) for building dlisio from source. diff --git a/python/dlisio/__init__.py b/python/dlisio/__init__.py index 7f4626fc9..3b02b06d4 100644 --- a/python/dlisio/__init__.py +++ b/python/dlisio/__init__.py @@ -3,8 +3,18 @@ from . import lis from . import dlis -try: - import pkg_resources - __version__ = pkg_resources.get_distribution(__name__).version -except pkg_resources.DistributionNotFound: - pass +import sys + +# remove else once support for python 3.7 is over +if sys.version_info >= (3, 8): + try: + import importlib.metadata + __version__ = importlib.metadata.version(__name__) + except importlib.metadata.PackageNotFoundError: + pass +else: + try: + import pkg_resources + __version__ = pkg_resources.get_distribution(__name__).version + except pkg_resources.DistributionNotFound: + pass diff --git a/python/pyproject.toml b/python/pyproject.toml index a257b2ee7..2c647dbcb 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -93,7 +93,7 @@ test-command = [ manylinux-x86_64-image = "manylinux2014" [[tool.cibuildwheel.overrides]] -select = "cp3{9,10,11}*i686" +select = "cp3{9,10,11,12}*i686" before-build= [ "python -m pip install numpy --config-settings=setup-args=\"-Dallow-noblas=true\" ", """cmake \ From ffde4ffee680b9372b0f42aea09c5c69edcb6e03 Mon Sep 17 00:00:00 2001 From: Alena Chaikouskaya Date: Wed, 1 Nov 2023 18:41:26 +0100 Subject: [PATCH 09/12] Build python >= 3.10 wheels on Windows 32 We previously skipped wheels for windows 32 as numpy didn't supply them for win32 starting from python 3.10. They do now though. --- .github/workflows/wheels.yaml | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index 35162a4ce..05b01e94a 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -65,7 +65,7 @@ jobs: CIBW_ARCHS: ${{ matrix.arch }} # musllinux arch skip: unlikely someone wants to run dlisio on alpine on non-standard architecture # musllinux cp37 and cp38 skip: latest available numpy doesn't provide musslinux wheels, so it is unlikely useful - CIBW_SKIP: pp* *-musllinux_i686 *-musllinux_aarch64 cp37*-musllinux* cp38*-musllinux* cp36-* cp31*-win32 + CIBW_SKIP: pp* *-musllinux_i686 *-musllinux_aarch64 cp37*-musllinux* cp38*-musllinux* cp36-* run: | python -m cibuildwheel --output-dir wheelhouse python/ diff --git a/README.md b/README.md index 39d9e35d2..3a73ed369 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ pip install dlisio | CPython 3.7 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | - | | CPython 3.8 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | - | | CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| CPython 3.10 | ✅ | ✅ | - | ✅ | ✅ | ✅ | ✅ | -| CPython 3.11 | ✅ | ✅ | - | ✅ | ✅ | ✅ | ✅ | -| CPython 3.12 | ✅ | ✅ | - | ✅ | ✅ | ✅ | ✅ | +| CPython 3.10 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| CPython 3.11 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| CPython 3.12 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | See [Build dlisio](#Build-dlisio) for building dlisio from source. From 0c3deb348ccb70c0b947fa4edf569e5cb672dc66 Mon Sep 17 00:00:00 2001 From: Alena Chaikouskaya Date: Fri, 27 Oct 2023 14:51:17 +0200 Subject: [PATCH 10/12] Remove mentions of code contributions from Reamde Unfortunately at the moment as dlisio is no longer in active development phase, team doesn't have enough capacity to deal with external PRs in an efficient manner. --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3a73ed369..164e07731 100644 --- a/README.md +++ b/README.md @@ -137,8 +137,6 @@ By default, the python library is built. ## Contributing ## -We welcome all kinds of contributions, including code, bug reports, issues, -feature requests, and documentation. The preferred way of submitting a -contribution is to either make an -[issue](https://github.com/equinor/dlisio/issues) on github or by forking the -project on github and making a pull request. +We welcome all kinds of contributions, including bug reports, issues, feature +requests and documentation. The preferred way of submitting a contribution is to +make an [issue](https://github.com/equinor/dlisio/issues) on github. From cea67c48c9f13552f9b69c765f61659fff64955c Mon Sep 17 00:00:00 2001 From: Alena Chaikouskaya Date: Fri, 27 Oct 2023 15:41:38 +0200 Subject: [PATCH 11/12] Add SECURITY.md Add standard security template. --- SECURITY.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..fae264fe7 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,18 @@ +## SECURITY ## + +If you discover a security vulnerability in this project, please follow these steps to responsibly disclose it: + +1. **Do not** create a public GitHub issue for the vulnerability. +2. Follow our guideline for Responsible Disclosure Policy at [https://www.equinor.com/about-us/csirt](https://www.equinor.com/about-us/csirt) to report the issue + +The following information will help us triage your report more quickly: + +- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) +- Full paths of source file(s) related to the manifestation of the issue +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- Step-by-step instructions to reproduce the issue +- Proof-of-concept or exploit code (if possible) +- Impact of the issue, including how an attacker might exploit the issue + +We prefer all communications to be in English. From 73ddb8145a78a9b9bd8bca3cb68158cb60affc0e Mon Sep 17 00:00:00 2001 From: Alena Chaikouskaya Date: Wed, 1 Nov 2023 18:09:58 +0100 Subject: [PATCH 12/12] Build MacOS ARM wheels Note that we have to copy lots of code because it seems like toml files do now allow to share flow any other way. --- .github/workflows/wheels.yaml | 5 ++- README.md | 16 ++++----- python/pyproject.toml | 63 +++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index 05b01e94a..30ad81efa 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -32,6 +32,8 @@ jobs: arch: i686 - os: macos-11 arch: x86_64 + - os: macos-13-xlarge + arch: arm64 steps: - name: Disable autocrlf @@ -65,7 +67,8 @@ jobs: CIBW_ARCHS: ${{ matrix.arch }} # musllinux arch skip: unlikely someone wants to run dlisio on alpine on non-standard architecture # musllinux cp37 and cp38 skip: latest available numpy doesn't provide musslinux wheels, so it is unlikely useful - CIBW_SKIP: pp* *-musllinux_i686 *-musllinux_aarch64 cp37*-musllinux* cp38*-musllinux* cp36-* + # macosx 38 skip: cibuildwheel can't test it + CIBW_SKIP: pp* *-musllinux_i686 *-musllinux_aarch64 cp37*-musllinux* cp38*-musllinux* cp38*-macosx_*:arm64 cp36-* run: | python -m cibuildwheel --output-dir wheelhouse python/ diff --git a/README.md b/README.md index 164e07731..05da7cac6 100644 --- a/README.md +++ b/README.md @@ -47,14 +47,14 @@ pip install dlisio ``` -| | macOS Intel | Windows 64bit | Windows 32bit | manylinux x86_64 | manylinux aarch64 | manylinux i686 | musllinux x86_64 -|---------------|----|-----|-----|----|----|----|----| -| CPython 3.7 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | - | -| CPython 3.8 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | - | -| CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| CPython 3.10 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| CPython 3.11 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| CPython 3.12 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| | macOS Intel | macOS ARM | Windows 64bit | Windows 32bit | manylinux x86_64 | manylinux aarch64 | manylinux i686 | musllinux x86_64 +|---------------|----|-----|-----|----|----|----|----|----| +| CPython 3.7 | ✅ | - | ✅ | ✅ | ✅ | ✅ | ✅ | - | +| CPython 3.8 | ✅ | - | ✅ | ✅ | ✅ | ✅ | ✅ | - | +| CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| CPython 3.10 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| CPython 3.11 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| CPython 3.12 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | See [Build dlisio](#Build-dlisio) for building dlisio from source. diff --git a/python/pyproject.toml b/python/pyproject.toml index 2c647dbcb..2f6bc6795 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -114,3 +114,66 @@ before-build= [ [tool.cibuildwheel.macos] environment = { CXXFLAGS="-L/usr/local/lib" } + +before-all = [ + """curl \ + -L https://github.com/fmtlib/fmt/archive/refs/tags/7.1.3.tar.gz \ + -o fmt-7.1.3.tar.gz \ + """, + "tar xf fmt-7.1.3.tar.gz", + """cmake \ + -S fmt-7.1.3 \ + -B fmt-7.1.3/build \ + -DFMT_TEST=OFF \ + -DFMT_DOC=OFF \ + """, + """sudo cmake \ + --build fmt-7.1.3/build \ + --target install \ + --config Release \ + """, + """git clone https://github.com/equinor/layered-file-protocols.git""", + """cmake \ + -S layered-file-protocols \ + -B layered-file-protocols/build \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DLFP_FMT_HEADER_ONLY=ON \ + -DBUILD_TESTING=OFF \ + """, + """sudo cmake \ + --build layered-file-protocols/build \ + --target install \ + --config Release \ + """, + """curl \ + -L https://github.com/mpark/variant/archive/refs/tags/v1.4.0.tar.gz \ + -o variant-1.4.0.tar.gz \ + """, + "tar xf variant-1.4.0.tar.gz", + """cmake \ + -S variant-1.4.0 \ + -B variant-1.4.0/build \ + """, + """sudo cmake \ + --build variant-1.4.0/build \ + --target install \ + --config Release \ + """, +] + +before-build = [ + """cmake \ + -S . \ + -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DBUILD_TESTING=OFF \ + -DBUILD_PYTHON=OFF \ + """, + """sudo cmake \ + --build build \ + --parallel \ + --target install \ + --config Release \ + """, +]