-
Notifications
You must be signed in to change notification settings - Fork 8
/
BUILD.sh
executable file
·27 lines (27 loc) · 1.11 KB
/
BUILD.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
#
#cmake -DPYTHON_LIBRARY=$(python-config --prefix)/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=$(python-config --prefix)/include/python2.7 .
#
# cmake .. \
# -DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
# -DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \
# -DPYTHON_EXECUTABLE:FILEPATH=`which python`
# -DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; import os; print(os.path.join(sysconfig.get_config_var('LIBDIR'), sysconfig.get_config_var('LDLIBRARY')))")
#
LIBDIR=$(python -c "import distutils.sysconfig as sysconfig; import os; print(os.path.join(sysconfig.get_config_var('LIBDIR'), sysconfig.get_config_var('LDLIBRARY')))")
INCDIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")
#
echo "Using INCDIR=${INCDIR}"
echo "Using LIBDIR=${LIBDIR}"
#
rm -rf build
mkdir build
cd build
#cmake ..
cmake -DPYTHON_LIBRARY=${LIBDIR} -DPYTHON_INCLUDE_DIR=${INCDIR} ..
#
make
#
cd lib
python -c "import mmciflib" | grep "Symbol not found"
#