From 5f212660c7f1d924780c6b2b51051d7e30883cd4 Mon Sep 17 00:00:00 2001
From: Jacques Grelet <jacques.grelet@ird.fr>
Date: Mon, 9 Dec 2019 10:37:44 -0300
Subject: [PATCH] modify netcdftime by cftime in pyinstaller hook-netCDF4.py
 under Lib\site-packages\PyInstaller\hooks

---
 docs/Readme-Python.txt | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/docs/Readme-Python.txt b/docs/Readme-Python.txt
index dd624fa..1297451 100644
--- a/docs/Readme-Python.txt
+++ b/docs/Readme-Python.txt
@@ -591,14 +591,22 @@ ModuleNotFoundError: No module named 'cftime'
 
 Try solution may be found here:
 https://stackoverflow.com/questions/29067588/problems-building-python-distribion-containing-netcdf4
+Unistall/install last netCDF4 version:
+> pip uninstall netCDF4
+> pip install netCDF4
 
+Edit and modify:
+ C:\opt\python\Python37\Lib\site-packages\PyInstaller\hooks\hook-netCDF4.py
+replace:
+hiddenimports = ['netCDF4.utils', 'netcdftime']
+with:
+hiddenimports = ['netCDF4.utils', 'cftime']
 
-    remove the current pyinstaller: pip uninstall pyinstaller
-
-    clone and install pyinstaller from the python3 branch (https://github.com/pyinstaller/pyinstaller)
-
-    modify your .spec file from hiddenimports = [] to hiddenimports = ['netCDF4.utils', 'netcdftime']
+Version [1.4.0](https://pypi.python.org/pypi/netCDF4/1.4.0) released. 
+The netcdftime package is no longer included, it is now a separate 
+[package](https://pypi.python.org/pypi/cftime) dependency. 
 
+https://github.com/pyinstaller/pyinstaller/pull/4422/commits/a6098d062e713ab93d71ccb021d3c61f4a6b3360
 
 Tests unitaires avec unittest:
 --------------------
@@ -649,4 +657,4 @@ Merge made by the 'recursive' strategy.
  1 file changed, 2 insertions(+)
  create mode 100644 README.md
 
-make test
\ No newline at end of file
+make test
-- 
GitLab