add python-finding logic back in, needed on mac
@@ -3,6 +3,15 @@ set -e
mkdir build
cd build
+# figure out include / library paths
+# https://github.com/conda/conda-build/issues/2130 will be proper solution
+pyinc=$($PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())")
+if [[ $(uname) == "Darwin" ]]; then
+ pylib=$(otool -L $PYTHON | grep 'libpython.*\.dylib' | tr '\t' ' ' | cut -d' ' -f2 | sed "s|@rpath|$PREFIX/lib|")
+else
+ pylib=$(ldd $PYTHON | grep $PREFIX | grep 'libpython.*\.so' | cut -d' ' -f3)
+fi
+
cmake .. \
-DCMAKE_PREFIX_PATH="$PREFIX" \
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
@@ -14,6 +23,9 @@ cmake .. \
-DUSE_SVMLIGHT=OFF \
-DSWIG_EXECUTABLE=$PREFIX/bin/swig \
-DLIBSHOGUN=OFF \
+ -DPYTHON_INCLUDE_DIR=$pyinc \
+ -DPYTHON_LIBRARY=$pylib \
+ -DPYTHON_EXECUTABLE=$PYTHON
-DPythonModular=ON
make install
