mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-09 08:51:54 -04:00
nuitka build script: simplify, see #3227
Including cffi is already enough to make it work. Using --mode=onefile as suggested by Kay.
This commit is contained in:
parent
d3fa580f42
commit
38cefed974
1 changed files with 3 additions and 11 deletions
|
|
@ -7,30 +7,22 @@ OUTPUT_DIR="build"
|
|||
OUTPUT_FILENAME="borg-nuitka.exe" # .exe does NOT mean windows here
|
||||
SRC_DIR="src/borg"
|
||||
|
||||
echo "============================================"
|
||||
echo "Found Nuitka $(python -m nuitka --version | head -n 1)."
|
||||
echo "Building single-file binary of borgbackup..."
|
||||
echo "============================================"
|
||||
|
||||
# Run Nuitka compilation
|
||||
# We use --assume-yes-for-downloads to avoid interactive prompts in automated runs.
|
||||
# We set PYTHONPATH=src to ensure the local version of borg is used.
|
||||
# We include cffi and _cffi_backend to avoid runtime ModuleNotFoundError in argon2-cffi.
|
||||
# We include cffi to avoid runtime ModuleNotFoundError in argon2-cffi.
|
||||
PYTHONPATH=src python -m nuitka \
|
||||
--standalone \
|
||||
--onefile \
|
||||
--mode=onefile \
|
||||
--assume-yes-for-downloads \
|
||||
--include-package=borg \
|
||||
--include-package=borghash \
|
||||
--include-package=borgstore \
|
||||
--include-package=cffi \
|
||||
--include-module=_cffi_backend \
|
||||
--output-dir="$OUTPUT_DIR" \
|
||||
--output-filename="$OUTPUT_FILENAME" \
|
||||
"$SRC_DIR"
|
||||
|
||||
echo "============================================="
|
||||
echo "Build completed successfully!"
|
||||
echo "Single-file binary generated at:"
|
||||
echo " $OUTPUT_DIR/$OUTPUT_FILENAME"
|
||||
echo "============================================="
|
||||
echo "$OUTPUT_DIR/$OUTPUT_FILENAME"
|
||||
|
|
|
|||
Loading…
Reference in a new issue