|
@ -19,6 +19,7 @@ break_legacy_easy_install |
|
|
# (make_packages will later install a pinned version of pip in a venv) |
|
|
# (make_packages will later install a pinned version of pip in a venv) |
|
|
python3 -m pip install --upgrade pip |
|
|
python3 -m pip install --upgrade pip |
|
|
|
|
|
|
|
|
|
|
|
rm -rf "$PROJECT_ROOT/packages/" |
|
|
if ([ "$OMIT_UNCLEAN_FILES" != 1 ]); then |
|
|
if ([ "$OMIT_UNCLEAN_FILES" != 1 ]); then |
|
|
"$CONTRIB"/make_packages || fail "make_packages failed" |
|
|
"$CONTRIB"/make_packages || fail "make_packages failed" |
|
|
fi |
|
|
fi |
|
@ -37,7 +38,8 @@ git submodule update --init |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
if ([ "$OMIT_UNCLEAN_FILES" = 1 ]); then |
|
|
if ([ "$OMIT_UNCLEAN_FILES" = 1 ]); then |
|
|
rm "$PROJECT_ROOT/electrum/paymentrequest_pb2.py" |
|
|
# FIXME side-effecting repo... though in practice, this script probably runs in fresh_clone |
|
|
|
|
|
rm -f "$PROJECT_ROOT/electrum/paymentrequest_pb2.py" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
( |
|
|
( |
|
@ -52,17 +54,18 @@ fi |
|
|
fi |
|
|
fi |
|
|
TZ=UTC faketime -f '2000-11-11 11:11:11' python3 setup.py --quiet sdist --format=gztar --dist-dir="$PY_DISTDIR" |
|
|
TZ=UTC faketime -f '2000-11-11 11:11:11' python3 setup.py --quiet sdist --format=gztar --dist-dir="$PY_DISTDIR" |
|
|
if ([ "$OMIT_UNCLEAN_FILES" = 1 ]); then |
|
|
if ([ "$OMIT_UNCLEAN_FILES" = 1 ]); then |
|
|
for fn in "$DISTDIR/_sourceonly/"*; do |
|
|
python3 <<EOF |
|
|
# Since ELECTRUM_VERSION is not available to us in this script, we have to use a regex. |
|
|
import importlib.util |
|
|
# Expression 1: Electrum-X.Y.Z.tar.gz -> Electrum-sourceonly-X.Y.Z.tar.gz |
|
|
import os |
|
|
# Capture group \1 = Electrum |
|
|
|
|
|
# Capture group \2 = X.Y.Z.tar.gz |
|
|
# load version.py; needlessly complicated alternative to "imp.load_source": |
|
|
# Expression 2: dist/_sourceonly/X.tar.gz -> dist/X.tar.gz |
|
|
version_spec = importlib.util.spec_from_file_location('version', 'electrum/version.py') |
|
|
mv "$fn" $(sed \ |
|
|
version_module = importlib.util.module_from_spec(version_spec) |
|
|
-e 's/\(.*\)-\([^-]*\)/\1-sourceonly-\2/' \ |
|
|
version_spec.loader.exec_module(version_module) |
|
|
-e 's/\/_sourceonly//' \ |
|
|
|
|
|
<<< "$fn") |
|
|
VER = version_module.ELECTRUM_VERSION |
|
|
done |
|
|
os.rename(f"dist/_sourceonly/Electrum-{VER}.tar.gz", f"dist/Electrum-sourceonly-{VER}.tar.gz") |
|
|
|
|
|
EOF |
|
|
rmdir "$PY_DISTDIR" |
|
|
rmdir "$PY_DISTDIR" |
|
|
fi |
|
|
fi |
|
|
) |
|
|
) |
|
|