PyPI Openzwave (#7415)

* Remove default zwave config path

PYOZW now has much more comprehensive default handling for the config
path (in src-lib/libopenzwave/libopenzwave.pyx:getConfig()). It looks in
the same place we were looking, plus _many_ more. It will certainly do a
much better job of finding the config files than we will (and will be
updated as the library is changed, so we don't end up chasing it). The
getConfig() method has been there for a while, but was subsntially
improved recently.

This change simply leaves the config_path as None if it is not
specified, which will trigger the default handling in PYOZW.

* Install python-openzwave from PyPI

As of version 0.4, python-openzwave supports installation from PyPI,
which means we can use our 'normal' dependency management tooling to
install it. Yay.

This uses the default 'embed' build (which goes and downloads
statically sources to avoid having to compile anything locally). Check
out the python-openzwave readme for more details.

* Add python-openzwave deps to .travis.yml

Python OpenZwave require the libudev headers to build. This adds the
libudev-dev package to Travis runs via the 'apt' addon for Travis.

Thanks to @MartinHjelmare for this fix.

* Update docker build for PyPI openzwave

Now that PYOZW can be install from PyPI, the docker image build process
can be simplified to remove the explicit compilation of PYOZW.
This commit is contained in:
Josh Wright 2017-05-05 17:57:14 -04:00 committed by Paulus Schoutsen
parent 4b5be750b2
commit 2e4ae3e73d
6 changed files with 11 additions and 51 deletions

View file

@ -1,30 +0,0 @@
#!/bin/sh
# Sets up python-openzwave.
# Dependencies that need to be installed:
# apt-get install cython3 libudev-dev python3-sphinx python3-setuptools
# Stop on errors
set -e
cd "$(dirname "$0")/.."
if [ ! -d build ]; then
mkdir build
fi
cd build
if [ -d python-openzwave ]; then
cd python-openzwave
git checkout v0.3.3
else
git clone --branch v0.3.3 --recursive --depth 1 https://github.com/OpenZWave/python-openzwave.git
cd python-openzwave
fi
pip3 install --upgrade cython==0.24.1
PYTHON_EXEC=`which python3` make build
PYTHON_EXEC=`which python3` make install
mkdir -p /usr/local/share/python-openzwave
cp -R openzwave/config /usr/local/share/python-openzwave/config