Browse Source

build: don't assume git repo in make_packages.sh

to be able to run it from an unpacked sdist
master
SomberNight 3 years ago
parent
commit
fc7ff8198a
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 7
      contrib/make_packages.sh

7
contrib/make_packages.sh

@ -8,6 +8,7 @@ PROJECT_ROOT="$CONTRIB"/..
PACKAGES="$PROJECT_ROOT"/packages/
test -n "$CONTRIB" -a -d "$CONTRIB" || exit
cd "$CONTRIB"
if [ -d "$PACKAGES" ]; then
rm -r "$PACKAGES"
@ -21,7 +22,7 @@ python3 -m venv "$venv_dir"
source "$venv_dir"/bin/activate
# installing pinned build-time requirements, such as pip/wheel/setuptools
python -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \
python3 -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \
-r "$CONTRIB"/deterministic-build/requirements-build-base.txt
# opt out of compiling C extensions
@ -34,7 +35,7 @@ export FROZENLIST_NO_EXTENSIONS=1
# if we end up having to compile something, at least give reproducibility a fighting chance
export LC_ALL=C
export TZ=UTC
export SOURCE_DATE_EPOCH="$(git log -1 --pretty=%ct)"
export SOURCE_DATE_EPOCH="$(git log -1 --pretty=%ct 2>/dev/null || printf 1530212462)"
export PYTHONHASHSEED="$SOURCE_DATE_EPOCH"
export BUILD_DATE="$(LC_ALL=C TZ=UTC date +'%b %e %Y' -d @$SOURCE_DATE_EPOCH)"
export BUILD_TIME="$(LC_ALL=C TZ=UTC date +'%H:%M:%S' -d @$SOURCE_DATE_EPOCH)"
@ -49,4 +50,4 @@ export BUILD_TIME="$(LC_ALL=C TZ=UTC date +'%H:%M:%S' -d @$SOURCE_DATE_EPOCH)"
# note: --no-build-isolation is needed so that pip uses the locally available setuptools and wheel,
# instead of downloading the latest ones
python3 -m pip install --no-build-isolation --no-compile --no-dependencies --no-binary :all: \
-r "$CONTRIB"/deterministic-build/requirements.txt -t "$CONTRIB"/../packages
-r "$CONTRIB"/deterministic-build/requirements.txt -t "$PACKAGES"

Loading…
Cancel
Save