build: rename some scripts
also, merge sdist/build.sh and sdist/make_tgz into sdist/make_sdist.sh
This commit is contained in:
@@ -37,7 +37,7 @@ see [issue #5159](https://github.com/spesmilo/electrum/issues/5159).
|
||||
--rm \
|
||||
--workdir /opt/electrum/contrib/build-linux/appimage \
|
||||
electrum-appimage-builder-img \
|
||||
./build.sh
|
||||
./make_appimage.sh
|
||||
```
|
||||
|
||||
4. The generated binary is in `./dist`.
|
||||
|
||||
@@ -45,6 +45,6 @@ folder.
|
||||
--rm \
|
||||
--workdir /opt/electrum/contrib/build-linux/sdist \
|
||||
electrum-sdist-builder-img \
|
||||
./build.sh
|
||||
./make_sdist.sh
|
||||
```
|
||||
4. The generated distributables are in `./dist`.
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
PROJECT_ROOT="$(dirname "$(readlink -e "$0")")/../../.."
|
||||
CONTRIB="$PROJECT_ROOT/contrib"
|
||||
CONTRIB_SDIST="$CONTRIB/build-linux/sdist"
|
||||
DISTDIR="$PROJECT_ROOT/dist"
|
||||
|
||||
. "$CONTRIB"/build_tools_util.sh
|
||||
|
||||
# note that at least py3.7 is needed, to have https://bugs.python.org/issue30693
|
||||
python3 --version || fail "python interpreter not found"
|
||||
|
||||
break_legacy_easy_install
|
||||
|
||||
# upgrade to modern pip so that it knows the flags we need.
|
||||
# we will then install a pinned version of pip as part of requirements-build-sdist
|
||||
python3 -m pip install --upgrade pip
|
||||
|
||||
info "Installing pinned requirements."
|
||||
python3 -m pip install --no-dependencies --no-warn-script-location -r "$CONTRIB"/deterministic-build/requirements-build-sdist.txt
|
||||
|
||||
|
||||
"$CONTRIB"/make_packages || fail "make_packages failed"
|
||||
|
||||
"$CONTRIB_SDIST"/make_tgz || fail "make_tgz failed"
|
||||
|
||||
|
||||
info "done."
|
||||
ls -la "$DISTDIR"
|
||||
sha256sum "$DISTDIR"/*
|
||||
60
contrib/build-linux/sdist/make_sdist.sh
Executable file
60
contrib/build-linux/sdist/make_sdist.sh
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
PROJECT_ROOT="$(dirname "$(readlink -e "$0")")/../../.."
|
||||
CONTRIB="$PROJECT_ROOT/contrib"
|
||||
CONTRIB_SDIST="$CONTRIB/build-linux/sdist"
|
||||
DISTDIR="$PROJECT_ROOT/dist"
|
||||
LOCALE="$PROJECT_ROOT/electrum/locale/"
|
||||
|
||||
. "$CONTRIB"/build_tools_util.sh
|
||||
|
||||
# note that at least py3.7 is needed, to have https://bugs.python.org/issue30693
|
||||
python3 --version || fail "python interpreter not found"
|
||||
|
||||
break_legacy_easy_install
|
||||
|
||||
# upgrade to modern pip so that it knows the flags we need.
|
||||
# we will then install a pinned version of pip as part of requirements-build-sdist
|
||||
python3 -m pip install --upgrade pip
|
||||
|
||||
info "Installing pinned requirements."
|
||||
python3 -m pip install --no-dependencies --no-warn-script-location -r "$CONTRIB"/deterministic-build/requirements-build-sdist.txt
|
||||
|
||||
|
||||
"$CONTRIB"/make_packages || fail "make_packages failed"
|
||||
|
||||
git submodule update --init
|
||||
|
||||
(
|
||||
cd "$CONTRIB/deterministic-build/electrum-locale/"
|
||||
if ! which msgfmt > /dev/null 2>&1; then
|
||||
echo "Please install gettext"
|
||||
exit 1
|
||||
fi
|
||||
# We include both source (.po) and compiled (.mo) locale files in the source dist.
|
||||
# Maybe we should exclude the compiled locale files? see https://askubuntu.com/a/144139
|
||||
# (also see MANIFEST.in)
|
||||
rm -rf "$LOCALE"
|
||||
for i in ./locale/*; do
|
||||
dir="$PROJECT_ROOT/electrum/$i/LC_MESSAGES"
|
||||
mkdir -p "$dir"
|
||||
msgfmt --output-file="$dir/electrum.mo" "$i/electrum.po" || true
|
||||
cp $i/electrum.po "$PROJECT_ROOT/electrum/$i/electrum.po"
|
||||
done
|
||||
)
|
||||
|
||||
(
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
|
||||
|
||||
# note: .zip sdists would not be reproducible due to https://bugs.python.org/issue40963
|
||||
TZ=UTC faketime -f '2000-11-11 11:11:11' python3 setup.py --quiet sdist --format=gztar
|
||||
)
|
||||
|
||||
|
||||
info "done."
|
||||
ls -la "$DISTDIR"
|
||||
sha256sum "$DISTDIR"/*
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
CONTRIB_SDIST="$(dirname "$(readlink -e "$0")")"
|
||||
CONTRIB="$CONTRIB_SDIST"/../..
|
||||
ROOT_FOLDER="$CONTRIB"/..
|
||||
PACKAGES="$ROOT_FOLDER"/packages/
|
||||
LOCALE="$ROOT_FOLDER"/electrum/locale/
|
||||
|
||||
if [ ! -d "$PACKAGES" ]; then
|
||||
echo "Run make_packages first!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git submodule update --init
|
||||
|
||||
(
|
||||
cd "$CONTRIB/deterministic-build/electrum-locale/"
|
||||
if ! which msgfmt > /dev/null 2>&1; then
|
||||
echo "Please install gettext"
|
||||
exit 1
|
||||
fi
|
||||
# We include both source (.po) and compiled (.mo) locale files in the source dist.
|
||||
# Maybe we should exclude the compiled locale files? see https://askubuntu.com/a/144139
|
||||
# (also see MANIFEST.in)
|
||||
rm -rf "$LOCALE"
|
||||
for i in ./locale/*; do
|
||||
dir="$ROOT_FOLDER/electrum/$i/LC_MESSAGES"
|
||||
mkdir -p "$dir"
|
||||
msgfmt --output-file="$dir/electrum.mo" "$i/electrum.po" || true
|
||||
cp $i/electrum.po "$ROOT_FOLDER/electrum/$i/electrum.po"
|
||||
done
|
||||
)
|
||||
|
||||
(
|
||||
cd "$ROOT_FOLDER"
|
||||
|
||||
find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
|
||||
|
||||
# note: .zip sdists would not be reproducible due to https://bugs.python.org/issue40963
|
||||
TZ=UTC faketime -f '2000-11-11 11:11:11' python3 setup.py --quiet sdist --format=gztar
|
||||
)
|
||||
Reference in New Issue
Block a user