Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions contrib/build_bin_no_gui.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#! /bin/bash
# Script for building standalone binary releases deterministically

set -ex

eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
pip install -U pip
pip install poetry

# Setup poetry and install the dependencies
poetry install

# We also need to change the timestamps of all of the base library files
lib_dir=`pyenv root`/versions/3.9.7/lib/python3.9
TZ=UTC find ${lib_dir} -name '*.py' -type f -execdir touch -t "201901010000.00" '{}' \;

# Make the standalone binary
export PYTHONHASHSEED=42
poetry run pyinstaller hwi.spec
unset PYTHONHASHSEED

# Make the final compressed package
pushd dist
VERSION=`poetry run hwi --version | cut -d " " -f 2`
OS=`uname | tr '[:upper:]' '[:lower:]'`
if [[ $OS == "darwin" ]]; then
OS="mac"
fi
target_tarfile="hwi-${VERSION}-${OS}-amd64.tar.gz"
tar -czf $target_tarfile hwi

# Copy the binaries to subdir for shasum
target_dir="$target_tarfile.dir"
mkdir $target_dir
mv hwi $target_dir

popd
2 changes: 1 addition & 1 deletion contrib/build_dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pip install -U pip
pip install poetry

# Setup poetry and install the dependencies
poetry install -E qt
poetry install

# Make the distribution archives for pypi
poetry build -f wheel
Expand Down
17 changes: 17 additions & 0 deletions contrib/build_dist_no_gui.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#! /bin/bash
# Script for building pypi distribution archives deterministically

set -ex

eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
pip install -U pip
pip install poetry

# Setup poetry and install the dependencies
poetry install

# Make the distribution archives for pypi
poetry build -f wheel
# faketime is needed to make sdist detereministic
TZ=UTC faketime -f "2019-01-01 00:00:00" poetry build -f sdist