From 21c57d55364946fda474cdedfa8da41306b3f2c2 Mon Sep 17 00:00:00 2001 From: Michael Sarahan Date: Thu, 21 Sep 2017 15:59:39 -0500 Subject: [PATCH] fix/add dynamic detection of hdf5 with batch script --- recipe/bld.bat | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index 3608c0a..1f1f177 100755 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,5 +1,13 @@ +SETLOCAL EnableDelayedExpansion + +pushd %PREFIX%\conda-meta\ +for %%g in (hdf5*.json) do (set JSON_FILE=%%~g) +popd + +for /f "tokens=2 delims=-" %%i in ("%JSON_FILE%") do (set HDF5_VER=%%i) + :: hdf5 env var provided by conda-build 3 variant -python setup.py configure --hdf5="%LIBRARY_PREFIX%" --hdf5-version=%hdf5% +python setup.py configure --hdf5="%LIBRARY_PREFIX%" --hdf5-version=%HDF5_VER% if errorlevel 1 exit 1 python setup.py install --single-version-externally-managed --record record.txt