2015-02-22 17:36:28 -08:00
|
|
|
# Sets up and builds python open zwave to be used with Home Assistant
|
|
|
|
# Dependencies that need to be installed:
|
2015-03-15 00:05:18 -07:00
|
|
|
# apt-get install cython3 libudev-dev python-sphinx python3-setuptools
|
2015-02-22 17:36:28 -08:00
|
|
|
# pip3 install cython
|
|
|
|
|
|
|
|
# If current pwd is scripts, go 1 up.
|
|
|
|
if [ ${PWD##*/} == "scripts" ]; then
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
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
|
2015-03-18 19:15:48 -07:00
|
|
|
git clone --recursive https://github.com/balloob/python-openzwave.git
|
2015-03-15 00:05:18 -07:00
|
|
|
cd python-openzwave
|
|
|
|
fi
|
2015-02-22 17:36:28 -08:00
|
|
|
|
|
|
|
# Fix an issue with openzwave
|
|
|
|
sed -i '253s/.*//' openzwave/cpp/src/value_classes/ValueID.h
|
|
|
|
|
2015-03-15 00:05:18 -07:00
|
|
|
./compile.sh --python3
|
|
|
|
./install.sh --python3
|