Skip to content

allenporter/wheels-grpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grpc for Home Assistant

Build wheels for grpc and Home Assistant.

Manually building

A manual build can take 15 minutes to an hour

$ export ARCH=armv7
$ docker build --build-arg BUILD_FROM=homeassistant/${ARCH}-base-python:3.9-alpine3.14 --build-arg BUILD_ARCH=${ARCH} --tag grpc-builder:${ARCH} builder/

If the build was successful, the wheel files can be extracted from the resulting Docker images like so:

$ mkdir wheels
$ docker create --name grpc-builder grpc-builder:${ARCH} bash -c sleep 90000
$ docker cp "grpc-builder:/work/wheels/." wheels
$ docker rm grpc-builder

The wheels folder now contains the Python wheel.

Manual testing

This creates a new container and imports a package that depends on grpc to verify the cython imports work correctly.

# The name of the wheel file created above
$ export WHEEL=wheels/grpcio-1.43.0-cp39-cp39-linux_armv7l.whl
$ docker build --build-arg BUILD_FROM=homeassistant/${ARCH}-base-python:3.9-alpine3.14 --build-arg WHEEL=${WHEEL} --tag grpc-test:${ARCH} -f test/Dockerfile .
$ docker run grpc-test:${ARCH}
...
Package import success

About

Build wheels for grpc and Home Assistant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published