OpenZWave / python-openzwave

Python wrapper for openzwave
Other
200 stars 140 forks source link

Cacheing of build artifacts #103

Open timcoote opened 7 years ago

timcoote commented 7 years ago

This is more of a question than an issue. Can I - and if so how - use wheel to produce and stash build artifacts for repeated installation?

I have a CD pipeline for raspberry pis and repeatedly compiling the openzwave binaries in an ARM docker instance on EC2 is really slow.

timcoote commented 7 years ago

I can see that pypi is now enabling ARM binary wheels, and I can build these for simple installs, saving ~15 mins on an install. However, afaict, the embed_shared flavo[u]r flag passed to pip install seems to build new binaries and I cannot work out how to get these out and put into a wheel.

I think that I'm correct in saying that the install api to setup.py ought to only install, and not build.

bibi21000 commented 6 years ago

Don't know how wheels works pip use the setup.py which build/install anything. setup-api, setup-lib are for python-openzwave developpers only. Maybe it should be possible to use them with the embed "saveur" (https://www.linguee.fr/francais-anglais/traduction/saveur.html) : it build a statically linked module. Don't know if it should work with the embed_shared.

timcoote commented 6 years ago

I'm not sure whether you meant to, but the ARMv7 wheels are all in pypi now. If it was yourself, thanks.

If building wheels is part of the repo, can I help to add in support for rpi3, which is aarch64 based. Although Raspbian still runs as ARMv7 on these, Fedora now runs native 64 bit. So it would be nice to get those wheels up there, too.

timcoote commented 5 years ago

I've been using the pypi wheels with some success on Raspbian. Thanks: installation time is down from ~20 mins to a few seconds.

Unfortunately, I'd pinned the version to 0.4.4 until I'd tested for later versions, and the pypi files only seem to cover the current release. Pip will happily build the correct version, but it takes a while on any ARM based system. Is it possible to keep old versions, or should I up the tempo in keeping current with python_openzwave (or stash wheels myself and re-use them from a private url)?

kdschlosser commented 5 years ago

wheel support has been added to 0.5.x. you can test and see if it work by using the code in PR #182 These are the 2 commands you will need to run. make sure you do this on a non production raspberry. it is going to install a development version of the library

python setup.py install --flavor=dev python setup.py bdist_wheel --flavor=dev

it will place the wheel file in the dist folder where the setup.py file is.