diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 91aec1d..e23c587 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -23,11 +23,6 @@ jobs: timeoutInMinutes: 360 steps: - - script: | - rm -rf /opt/ghc - df -h - displayName: Manage disk space - # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | diff --git a/.ci_support/migrations/jasper4.yaml b/.ci_support/migrations/jasper4.yaml deleted file mode 100644 index ce4c7ae..0000000 --- a/.ci_support/migrations/jasper4.yaml +++ /dev/null @@ -1,8 +0,0 @@ -migrator_ts: 1678798913 -__migrator: - kind: version - migration_number: 1 - bump_number: 1 - -jasper: - - 4 diff --git a/.ci_support/migrations/libnetcdf491.yaml b/.ci_support/migrations/libnetcdf491.yaml deleted file mode 100644 index eac98f2..0000000 --- a/.ci_support/migrations/libnetcdf491.yaml +++ /dev/null @@ -1,7 +0,0 @@ -__migrator: - build_number: 1 - kind: version - migration_number: 1 -libnetcdf: -- 4.9.1 -migrator_ts: 1676063819.0284579 diff --git a/.ci_support/migrations/libnetcdf492.yaml b/.ci_support/migrations/libnetcdf492.yaml deleted file mode 100644 index 475d832..0000000 --- a/.ci_support/migrations/libnetcdf492.yaml +++ /dev/null @@ -1,7 +0,0 @@ -__migrator: - build_number: 1 - kind: version - migration_number: 1 -libnetcdf: -- 4.9.2 -migrator_ts: 1678915697.6091654 diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index f169576..5ef2a19 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -55,7 +55,6 @@ source run_conda_forge_build_setup echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml - if [[ -f LICENSE.txt ]]; then cp LICENSE.txt "recipe/recipe-scripts-license.txt" fi @@ -71,6 +70,7 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else + conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml diff --git a/recipe/0013-esmpy-imports.patch b/recipe/0013-esmpy-imports.patch new file mode 100644 index 0000000..80f6ea2 --- /dev/null +++ b/recipe/0013-esmpy-imports.patch @@ -0,0 +1,68 @@ +diff -ruN cdms-3.1.5/regrid2/Lib/esmf.py cdms-3.1.5-patch/regrid2/Lib/esmf.py +--- cdms-3.1.5/regrid2/Lib/esmf.py 2020-07-31 03:01:33.000000000 +0200 ++++ cdms-3.1.5-patch/regrid2/Lib/esmf.py 2023-08-01 09:02:26.554853011 +0200 +@@ -15,7 +15,10 @@ + import time + import numpy + from regrid2 import RegridError +-import ESMF ++try: ++ import esmpy as ESMF ++except ImportError: ++ import ESMF + from functools import reduce + + # constants +diff -ruN cdms-3.1.5/regrid2/Lib/__init__.py cdms-3.1.5-patch/regrid2/Lib/__init__.py +--- cdms-3.1.5/regrid2/Lib/__init__.py 2020-07-31 03:01:33.000000000 +0200 ++++ cdms-3.1.5-patch/regrid2/Lib/__init__.py 2023-08-01 09:01:50.815080096 +0200 +@@ -14,7 +14,10 @@ + from .mvGenericRegrid import GenericRegrid # noqa + from .mvLibCFRegrid import LibCFRegrid # noqa + try: +- import ESMF ++ try: ++ import esmpy as ESMF ++ except ImportError: ++ import ESMF + ESMF.deprecated.__globals__[ + 'warnings'].warn_explicit = ESMF.deprecated.__globals__['warnings'].formatwarning + from .mvESMFRegrid import ESMFRegrid # noqa +@@ -24,7 +27,10 @@ + ESMF_HAS_BEEN_INITIALIZED = False + if not ESMF_HAS_BEEN_INITIALIZED: + try: +- import ESMF ++ try: ++ import esmpy as ESMF ++ except ImportError: ++ import ESMF + ESMF.deprecated.__globals__[ + 'warnings'].warn_explicit = ESMF.deprecated.__globals__['warnings'].formatwarning + ESMF.Manager(debug=False) +diff -ruN cdms-3.1.5/regrid2/Lib/mvESMFRegrid.py cdms-3.1.5-patch/regrid2/Lib/mvESMFRegrid.py +--- cdms-3.1.5/regrid2/Lib/mvESMFRegrid.py 2020-07-31 03:01:33.000000000 +0200 ++++ cdms-3.1.5-patch/regrid2/Lib/mvESMFRegrid.py 2023-08-01 09:02:26.538853112 +0200 +@@ -12,7 +12,10 @@ + import socket + import numpy + +-import ESMF ++try: ++ import esmpy as ESMF ++except ImportError: ++ import ESMF + from . import esmf + from . import RegridError + from .mvGenericRegrid import GenericRegrid +diff -ruN cdms-3.1.5/regrid2/Lib/mytest.py cdms-3.1.5-patch/regrid2/Lib/mytest.py +--- cdms-3.1.5/regrid2/Lib/mytest.py 2020-07-31 03:01:33.000000000 +0200 ++++ cdms-3.1.5-patch/regrid2/Lib/mytest.py 2023-08-01 09:04:07.634210699 +0200 +@@ -1,2 +1,6 @@ +-import ESMF # noqa ++try: ++ import esmpy as ESMF # noqa ++except ImportError: ++ import ESMF # noqa ++ + from .mvESMFRegrid import ESMFRegrid # noqa diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ce88249..f5a1f81 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -21,9 +21,10 @@ source: - 0010-Adds-LongLong-type-for-CDML.patch - 0011-remove-numpy-float-int.patch - 0012-remove-libdrs-rename-libgrib2c.patch + - 0013-esmpy-imports.patch build: - number: 20 + number: 21 skip: True # [win] requirements: @@ -69,6 +70,7 @@ test: - python -c 'import regrid2' - python -c 'import regrid2._regrid' - python -c 'import regrid2._scrip' + - python -c 'from regrid2 import ESMFRegrid' - cdscan --help about: