hass-core/virtualization/Docker/setup_docker_prereqs
Josh Wright 2e4ae3e73d PyPI Openzwave ()
* 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.
2017-05-05 14:57:14 -07:00

71 lines
1.8 KiB
Bash
Executable file

#!/bin/bash
# Install requirements and build dependencies for Home Assistant in Docker.
# Stop on errors
set -e
INSTALL_TELLSTICK="${INSTALL_TELLSTICK:-yes}"
INSTALL_OPENALPR="${INSTALL_OPENALPR:-yes}"
INSTALL_FFMPEG="${INSTALL_FFMPEG:-yes}"
INSTALL_LIBCEC="${INSTALL_LIBCEC:-yes}"
INSTALL_PHANTOMJS="${INSTALL_PHANTOMJS:-yes}"
INSTALL_COAP_CLIENT="${INSTALL_COAP_CLIENT:-yes}"
# Required debian packages for running hass or components
PACKAGES=(
# build-essential is required for python pillow module on non-x86_64 arch
build-essential
# homeassistant.components.image_processing.openalpr_local
libxrandr-dev
# homeassistant.components.device_tracker.nmap_tracker
nmap net-tools libcurl3-dev
# homeassistant.components.device_tracker.bluetooth_tracker
bluetooth libglib2.0-dev libbluetooth-dev
# homeassistant.components.device_tracker.owntracks
libsodium13
# homeassistant.components.zwave
libudev-dev
)
# Required debian packages for building dependencies
PACKAGES_DEV=(
cmake git
# libcec
swig
)
# Install packages
apt-get update
apt-get install -y --no-install-recommends ${PACKAGES[@]} ${PACKAGES_DEV[@]}
if [ "$INSTALL_TELLSTICK" == "yes" ]; then
virtualization/Docker/scripts/tellstick
fi
if [ "$INSTALL_OPENALPR" == "yes" ]; then
virtualization/Docker/scripts/openalpr
fi
if [ "$INSTALL_FFMPEG" == "yes" ]; then
virtualization/Docker/scripts/ffmpeg
fi
if [ "$INSTALL_LIBCEC" == "yes" ]; then
virtualization/Docker/scripts/libcec
fi
if [ "$INSTALL_PHANTOMJS" == "yes" ]; then
virtualization/Docker/scripts/phantomjs
fi
if [ "$INSTALL_COAP_CLIENT" == "yes" ]; then
virtualization/Docker/scripts/coap_client
fi
# Remove packages
apt-get remove -y --purge ${PACKAGES_DEV[@]}
apt-get -y --purge autoremove
# Cleanup
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* build/