Bump version number in
hwilib/__init__.py, generate the setup.py file, and git tag release
Build distribution archives for PyPi with
For MacOS and Linux, use
contrib/build_bin.sh. This needs to be run on a MacOS machine for the MacOS binary and on a Linux machine for the linux one.
For Windows, use
contrib/build_wine.shto build the Windows binary using wine
Upload distribution archives to PyPi
Upload distribution archives and standalone binaries to Github
Deterministic builds with Docker¶
Create the docker image:
docker build --no-cache -t hwi-builder -f contrib/build.Dockerfile .
docker run -it --name hwi-builder -v $PWD:/opt/hwi --rm --workdir /opt/hwi hwi-builder /bin/bash -c "contrib/build_bin.sh && contrib/build_dist.sh && contrib/build_wine.sh"
Building macOS binary¶
Note that the macOS build is non-deterministic.
First install pyenv using whichever method you prefer.
Then a deterministic build of Python 3.6.8 needs to be installed. This can be done with the patch in
cd into HWI’s source tree. Then use:
cat contrib/reproducible-python.diff | PYTHON_CONFIGURE_OPTS="--enable-framework" BUILD_DATE="Jan 1 2019" BUILD_TIME="00:00:00" pyenv install -kp 3.6.8
Make sure that python 3.6.8 is active:
$ python --version Python 3.6.8
Now install Poetry with
pip install poetry
Additional dependencies can be installed with:
brew install libusb
Build the binaries by using