xantares / nfc-bindings

scripting language bindings for libnfc
BSD 3-Clause "New" or "Revised" License
23 stars 9 forks source link

Install into homebrew cellar #10

Closed z3ntu closed 6 years ago

z3ntu commented 6 years ago

It would be nice if this would be added to the readme as instructions for macOS (for people using homebrew) - or not and people can just find it here in this issue:

brew install libnfc cmake swig
git clone https://github.com/xantares/nfc-bindings.git
cd nfc-bindings
mkdir build && cd build
PYTHON_EXEC=$(which python3)
PYTHON_PREFIX=$($PYTHON_EXEC -c 'import sys;print(sys.prefix)')
PYTHON_INC_DIR=$($PYTHON_EXEC -c 'from distutils import sysconfig;print(sysconfig.get_python_inc(True))')
PYTHON_LIB_DIR=$PYTHON_PREFIX/Python
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/nfc-bindings/git -DPYTHON_EXECUTABLE=$PYTHON_EXEC -DPYTHON_INCLUDE_DIR=$PYTHON_INC_DIR -DPYTHON_LIBRARY=$PYTHON_LIB_DIR ..
make install
brew link nfc-bindings
xantares commented 6 years ago

bd93cc9