3
0
Fork 0
forked from mirrors/nixpkgs

pyscf: backport of h5py fixes, closes #138127

pyscf: adding patch explanation
This commit is contained in:
Phillip Seeber 2021-09-16 14:43:15 +02:00
parent 414eeea895
commit 9c6998f542
2 changed files with 17 additions and 0 deletions

View file

@ -13,6 +13,10 @@ buildPythonPackage rec {
sha256 = "0xbwkjxxysfpqz72qn6n4a0zr2h6sprbcal8j7kzymh7swjy117w";
};
# Backport from the 2.0.0 alpha releases of PySCF.
# H5Py > 3.3 deprecates the file modes, that PySCF sets.
patches = [ ./h5py.patch ];
buildInputs = [
libcint
libxc

View file

@ -0,0 +1,13 @@
diff --git a/pyscf/lib/misc.py b/pyscf/lib/misc.py
index ed43689ff..a8a0d0e20 100644
--- a/pyscf/lib/misc.py
+++ b/pyscf/lib/misc.py
@@ -42,8 +42,6 @@ if h5py.version.version[:4] == '2.2.':
sys.stderr.write('h5py-%s is found in your environment. '
'h5py-%s has bug in threading mode.\n'
'Async-IO is disabled.\n' % ((h5py.version.version,)*2))
-if h5py.version.version[:2] == '3.':
- h5py.get_config().default_file_mode = 'a'
c_double_p = ctypes.POINTER(ctypes.c_double)
c_int_p = ctypes.POINTER(ctypes.c_int)