2017-01-02 22:04:09 +01:00
|
|
|
#!/bin/sh
|
|
|
|
# Sets up and builds python open zwave to be used with Home Assistant.
|
2015-10-24 11:27:47 -07:00
|
|
|
# Dependencies that need to be installed:
|
2016-02-28 12:40:17 -08:00
|
|
|
# apt-get install cython3 libudev-dev python3-sphinx python3-setuptools
|
2015-02-22 17:36:28 -08:00
|
|
|
|
2017-01-02 22:04:09 +01:00
|
|
|
# Stop on errors
|
|
|
|
set -e
|
|
|
|
|
2015-09-17 00:35:26 -07:00
|
|
|
cd "$(dirname "$0")/.."
|
2015-02-22 17:36:28 -08:00
|
|
|
|
2015-03-15 00:05:18 -07:00
|
|
|
if [ ! -d build ]; then
|
|
|
|
mkdir build
|
|
|
|
fi
|
|
|
|
|
2015-02-28 09:09:32 -08:00
|
|
|
cd build
|
2015-02-22 17:36:28 -08:00
|
|
|
|
2015-03-15 00:05:18 -07:00
|
|
|
if [ -d python-openzwave ]; then
|
|
|
|
cd python-openzwave
|
|
|
|
git pull --recurse-submodules=yes
|
|
|
|
git submodule update --init --recursive
|
|
|
|
else
|
2017-01-02 22:04:09 +01:00
|
|
|
git clone --branch python3 --recursive --depth 1 https://github.com/OpenZWave/python-openzwave.git
|
2015-03-15 00:05:18 -07:00
|
|
|
cd python-openzwave
|
|
|
|
fi
|
2015-02-22 17:36:28 -08:00
|
|
|
|
2016-02-28 12:40:17 -08:00
|
|
|
git checkout python3
|
2016-10-25 23:38:32 -07:00
|
|
|
pip3 install --upgrade cython==0.24.1
|
2016-02-28 12:40:17 -08:00
|
|
|
PYTHON_EXEC=`which python3` make build
|
2016-02-28 20:46:16 -08:00
|
|
|
PYTHON_EXEC=`which python3` make install
|