From e262e1b9f09e699692be1c8648d8f67e53e697a5 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 19 Jul 2023 12:35:36 -0400 Subject: [PATCH 1/4] try skipping manual install of netcdf binaries --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 1dc9d2a1..ebd0f688 100644 --- a/tox.ini +++ b/tox.ini @@ -51,7 +51,7 @@ deps = commands = # Regenerate NetCDF4-Python wheel from source files # Use older version due to errors in new version (https://github.com/Unidata/netcdf4-python/issues/1192) - python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir netcdf4==1.5.8 --no-binary netcdf4 + # python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir netcdf4==1.5.8 --no-binary netcdf4 # Rebuild GDAL in order to gain access to GDAL system-level objects python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir gdal=={env:GDAL_VERSION} --no-binary gdal # Run tests From 03ac61635a99169c5d0060a28dd2410465c38574 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 19 Jul 2023 13:46:15 -0400 Subject: [PATCH 2/4] only rebuild netcdf4 on Linux --- tox.ini | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index ebd0f688..c207dc16 100644 --- a/tox.ini +++ b/tox.ini @@ -29,6 +29,9 @@ allowlist_externals = make [testenv] +platform = + linux: linux + macos: darwin setenv = PYTEST_ADDOPTS = --numprocesses=logical --durations=10 passenv = @@ -50,8 +53,8 @@ deps = gdal == {env:GDAL_VERSION} commands = # Regenerate NetCDF4-Python wheel from source files - # Use older version due to errors in new version (https://github.com/Unidata/netcdf4-python/issues/1192) - # python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir netcdf4==1.5.8 --no-binary netcdf4 + # Use older version on Linux due to errors in new version (https://github.com/Unidata/netcdf4-python/issues/1192) + linux: python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir netcdf4==1.5.8 --no-binary netcdf4 # Rebuild GDAL in order to gain access to GDAL system-level objects python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir gdal=={env:GDAL_VERSION} --no-binary gdal # Run tests From 32a34d984cf9d2f06fc09af6d59c053d4f72a7a3 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 19 Jul 2023 14:28:22 -0400 Subject: [PATCH 3/4] add platform to tox-env --- .github/workflows/main.yml | 12 ++++++------ tox.ini | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f8e052d8..a65b72f1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,22 +37,22 @@ jobs: fail-fast: false matrix: include: - - tox-env: py38 + - tox-env: py38-linux python-version: "3.8" os: ubuntu-latest - - tox-env: py38 + - tox-env: py38-macos python-version: "3.8" os: macos-latest - - tox-env: py39 + - tox-env: py39-linux python-version: "3.9" os: ubuntu-latest - - tox-env: py310 + - tox-env: py310-linux python-version: "3.10" os: ubuntu-latest - - tox-env: py311 + - tox-env: py311-linux python-version: "3.11" os: ubuntu-latest - - tox-env: py311 + - tox-env: py311-macos python-version: "3.11" os: macos-latest steps: diff --git a/tox.ini b/tox.ini index c207dc16..11a07c72 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ min_version = 4.0 envlist = black - py{38,39,310,311} + py{38,39,310,311}-{linux,macos} docs requires = pip >=21.0 From 470c8ece878acfb8d6b3949b508424c4810c4823 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 19 Jul 2023 14:52:27 -0400 Subject: [PATCH 4/4] try using netcdf4 v1.6.4 --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 11a07c72..9039fd25 100644 --- a/tox.ini +++ b/tox.ini @@ -53,8 +53,8 @@ deps = gdal == {env:GDAL_VERSION} commands = # Regenerate NetCDF4-Python wheel from source files - # Use older version on Linux due to errors in new version (https://github.com/Unidata/netcdf4-python/issues/1192) - linux: python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir netcdf4==1.5.8 --no-binary netcdf4 + # Rebuild netcdf4 on Linux due to errors in new version (https://github.com/Unidata/netcdf4-python/issues/1192) + linux: python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir netcdf4==1.6.4 --no-binary netcdf4 # Rebuild GDAL in order to gain access to GDAL system-level objects python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir gdal=={env:GDAL_VERSION} --no-binary gdal # Run tests