[netcdf4-python] 02/03: Add patch to support HDF5 openmpi variant used to build netcdf.
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Tue Jul 28 21:46:21 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch experimental
in repository netcdf4-python.
commit 82a4d923abe88cc9a10fd60ef62e13148497dace
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Tue Jul 28 23:22:06 2015 +0200
Add patch to support HDF5 openmpi variant used to build netcdf.
---
debian/changelog | 1 +
debian/patches/link-hdf5.patch | 43 ++++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 7 +++++--
4 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 49e3faa..c159ae6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
netcdf4-python (1.1.8-3) UNRELEASED; urgency=medium
* Update branch in gbp.conf & Vcs-Git URL.
+ * Add patch to support HDF5 openmpi variant used to build netcdf.
-- Bas Couwenberg <sebastic at debian.org> Tue, 28 Jul 2015 23:19:32 +0200
diff --git a/debian/patches/link-hdf5.patch b/debian/patches/link-hdf5.patch
new file mode 100644
index 0000000..6163e10
--- /dev/null
+++ b/debian/patches/link-hdf5.patch
@@ -0,0 +1,43 @@
+Description: Append HDF5 paths to support MPI variant.
+Author: Bas Couwenberg <sebastic at debian.org>
+
+--- a/setup.py
++++ b/setup.py
+@@ -130,6 +130,9 @@ def getnetcdfvers(libdirs):
+ HDF5_dir = os.environ.get('HDF5_DIR')
+ HDF5_incdir = os.environ.get('HDF5_INCDIR')
+ HDF5_libdir = os.environ.get('HDF5_LIBDIR')
++MPI_dir = os.environ.get('MPI_DIR')
++MPI_incdir = os.environ.get('MPI_INCDIR')
++MPI_libdir = os.environ.get('MPI_LIBDIR')
+ netCDF4_dir = os.environ.get('NETCDF4_DIR')
+ netCDF4_incdir = os.environ.get('NETCDF4_INCDIR')
+ netCDF4_libdir = os.environ.get('NETCDF4_LIBDIR')
+@@ -165,6 +168,12 @@ if os.path.exists(setup_cfg):
+ except: pass
+ try: HDF5_incdir = config.get("directories", "HDF5_incdir")
+ except: pass
++ try: MPI_dir = config.get("directories", "MPI_dir")
++ except: pass
++ try: MPI_libdir = config.get("directories", "MPI_libdir")
++ except: pass
++ try: MPI_incdir = config.get("directories", "MPI_incdir")
++ except: pass
+ try: netCDF4_dir = config.get("directories", "netCDF4_dir")
+ except: pass
+ try: netCDF4_libdir = config.get("directories", "netCDF4_libdir")
+@@ -235,6 +244,14 @@ if not retcode:
+ lib_dirs = [str(l[2:].decode()) for l in dep.split() if l[0:2].decode() == '-L' ]
+ dep=subprocess.Popen([ncconfig,'--cflags'],stdout=subprocess.PIPE).communicate()[0]
+ inc_dirs = [str(i[2:].decode()) for i in dep.split() if i[0:2].decode() == '-I']
++ if HDF5_libdir:
++ lib_dirs.append(HDF5_libdir)
++ if HDF5_incdir:
++ inc_dirs.append(HDF5_incdir)
++ if MPI_libdir:
++ lib_dirs.append(MPI_libdir)
++ if MPI_incdir:
++ inc_dirs.append(MPI_incdir)
+ # if nc-config didn't work (it won't on windows), fall back on brute force method
+ else:
+ dirstosearch = [os.path.expanduser('~'),'/usr/local','/sw','/opt','/opt/local', '/usr']
diff --git a/debian/patches/series b/debian/patches/series
index 9afe037..cc41ecf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
cython-clean.patch
no-online-tests.patch
fix-manpage-syntax.patch
+link-hdf5.patch
diff --git a/debian/rules b/debian/rules
index a4f7ae0..89fd092 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,8 +2,11 @@
#DH_VERBOSE := 1
-export HDF5_INCDIR=/usr/include/hdf5/serial
-export HDF5_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
+export HDF5_INCDIR=/usr/include/hdf5/openmpi
+export HDF5_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/openmpi
+
+export MPI_INCDIR=/usr/lib/openmpi/include
+export MPI_LIBDIR=/usr/lib/openmpi/lib
export USE_NCCONFIG=1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/netcdf4-python.git
More information about the Pkg-grass-devel
mailing list