diff --git a/.gitlab/ci/configure_fedora35.cmake b/.gitlab/ci/configure_fedora35.cmake
index d0fbc3f5f83..d1e3329d24a 100644
--- a/.gitlab/ci/configure_fedora35.cmake
+++ b/.gitlab/ci/configure_fedora35.cmake
@@ -1 +1,5 @@
+
+# Enable default-off plugin with Python dependency
+set(PARAVIEW_PLUGIN_ENABLE_NetCDFTimeAnnotationPlugin ON CACHE BOOL "")
+
include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora_common.cmake")
diff --git a/.gitlab/ci/configure_windows_vs2019_kits_mpi_python_qt.cmake b/.gitlab/ci/configure_windows_vs2019_kits_mpi_python_qt.cmake
index 2f8e2f926e8..60aa153c7db 100644
--- a/.gitlab/ci/configure_windows_vs2019_kits_mpi_python_qt.cmake
+++ b/.gitlab/ci/configure_windows_vs2019_kits_mpi_python_qt.cmake
@@ -1 +1,4 @@
+# Enable default-off plugin with Python dependency
+set(PARAVIEW_PLUGIN_ENABLE_NetCDFTimeAnnotationPlugin ON CACHE BOOL "")
+
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_vs2019.cmake")
diff --git a/.gitlab/ci/docker/fedora35/install_deps.sh b/.gitlab/ci/docker/fedora35/install_deps.sh
index ab80e89b265..f682e212dd9 100755
--- a/.gitlab/ci/docker/fedora35/install_deps.sh
+++ b/.gitlab/ci/docker/fedora35/install_deps.sh
@@ -47,7 +47,7 @@ dnf install -y --setopt=install_weak_deps=False \
python3-pandas python3-pandas-datareader python3-sphinx python3-pip \
python3-mpi4py-mpich python3-mpi4py-openmpi python3-matplotlib
-python3 -m pip install wslink
+python3 -m pip install wslink cftime
# Plugin dependencies
dnf install -y --setopt=install_weak_deps=False \
diff --git a/.gitlab/ci/requirements-phase1.txt b/.gitlab/ci/requirements-phase1.txt
deleted file mode 100644
index 0add2ccdd94..00000000000
--- a/.gitlab/ci/requirements-phase1.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file should always contain exact version references so that we know what
-# we are actually testing at any given point.
-
-# Needed for netcdftime.
-Cython==0.29.21
diff --git a/.gitlab/ci/requirements-phase2.txt b/.gitlab/ci/requirements.txt
similarity index 84%
rename from .gitlab/ci/requirements-phase2.txt
rename to .gitlab/ci/requirements.txt
index 310d7d54072..2ac09c93abc 100644
--- a/.gitlab/ci/requirements-phase2.txt
+++ b/.gitlab/ci/requirements.txt
@@ -2,8 +2,7 @@
# we are actually testing at any given point.
# NetCDFTimeAnnotationPlugin
-# Needs Cython installed before it can be `pip install`'d
-netcdftime==1.0.0a2
+cftime==1.6.0
# numpy
# Note that Linux will need 1.19.4
diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml
index 64a9aa9873b..6215f43b0ac 100644
--- a/.gitlab/os-linux.yml
+++ b/.gitlab/os-linux.yml
@@ -22,7 +22,7 @@
.fedora35:
extends: .linux
- image: "kitware/paraview:ci-fedora35-20220420"
+ image: "kitware/paraview:ci-fedora35-20220620"
.el8_icc:
extends: .linux
diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml
index e96a15d409d..0b4ca58a785 100644
--- a/.gitlab/os-windows.yml
+++ b/.gitlab/os-windows.yml
@@ -99,8 +99,7 @@
# This may be necessary when running manually.
# Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
- . .\build\ci-venv\Scripts\Activate.ps1
- - pip install -qq -r $pwdpath\.gitlab\ci\requirements-phase1.txt
- - pip install -qq -r $pwdpath\.gitlab\ci\requirements-phase2.txt
+ - pip install -qq -r $pwdpath\.gitlab\ci\requirements.txt
- Set-Item -Force -Path "env:PATH" -Value "$env:PATH;$env:SCCACHE_PATH"
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
- sccache --start-server
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6182af1ec31..a336dfed195 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -275,7 +275,6 @@ set(paraview_default_plugins
LegacyExodusReader
Moments
MooseXfemClip
- NetCDFTimeAnnotationPlugin
NodeEditor
NonOrthogonalSource
PacMan
diff --git a/Plugins/NetCDFTimeAnnotationPlugin/CMakeLists.txt b/Plugins/NetCDFTimeAnnotationPlugin/CMakeLists.txt
index 383676adf91..6470e7835cd 100644
--- a/Plugins/NetCDFTimeAnnotationPlugin/CMakeLists.txt
+++ b/Plugins/NetCDFTimeAnnotationPlugin/CMakeLists.txt
@@ -4,14 +4,28 @@ paraview_add_plugin(NetCDFTimeAnnotationPlugin
VERSION "1.0"
SERVER_MANAGER_XML NetCDFTimeAnnotation.xml)
-set_property(GLOBAL APPEND
- PROPERTY
- vtk_required_python_modules "netcdftime")
+include(FindPythonModules)
-if (BUILD_TESTING)
- include(FindPythonModules)
- find_python_module(netcdftime netcdftime_found)
- if (netcdftime_found)
+# First look for the module cftime
+find_python_module(cftime module_found)
+if (module_found)
+ set(module_name "cftime")
+else ()
+ # If cftime is not found, search for netcdftime
+ find_python_module(netcdftime module_found)
+ if (module_found)
+ set(module_name "netcdftime")
+ endif ()
+endif ()
+
+if (module_found)
+ set_property(GLOBAL APPEND
+ PROPERTY
+ vtk_required_python_modules "${module_name}")
+ if (BUILD_TESTING)
add_subdirectory(Testing)
- endif()
+ endif ()
+else ()
+ message(FATAL_ERROR
+ "The Python module cftime (preferred) or netcdftime is required to build this plugin.")
endif ()
diff --git a/Plugins/NetCDFTimeAnnotationPlugin/NetCDFTimeAnnotation.xml b/Plugins/NetCDFTimeAnnotationPlugin/NetCDFTimeAnnotation.xml
index e38b0baecc0..f7107858ac4 100644
--- a/Plugins/NetCDFTimeAnnotationPlugin/NetCDFTimeAnnotation.xml
+++ b/Plugins/NetCDFTimeAnnotationPlugin/NetCDFTimeAnnotation.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/Plugins/NetCDFTimeAnnotationPlugin/README.md b/Plugins/NetCDFTimeAnnotationPlugin/README.md
index 956695d0759..a85af6ef9bc 100644
--- a/Plugins/NetCDFTimeAnnotationPlugin/README.md
+++ b/Plugins/NetCDFTimeAnnotationPlugin/README.md
@@ -34,9 +34,9 @@ you need to change the order of the Date array elements as in the following exam
## Important note
-This plugin takes benefit from the third-party `netcdftime`
-Python module, it is mandatory to have it installed in order to build
-and use this filter.
+This plugin takes benefit from the third-party `cftime` or `netcdftime`
+Python modules (the former being preferred). It is mandatory to have
+one of them installed in order to build and use this filter.
## Example
User can refer to this page