| 1234567891011121314151617181920212223242526272829303132 |
- #!/usr/bin/env bash
- # 在 Linux/macOS + Python 3.11 环境下,将 runner.py 编译为独立可执行文件
- set -euo pipefail
- cd "$(dirname "$0")"
- python3 -m pip install -r requirements.txt
- rm -rf runner.dist runner.build
- export NUITKA_CACHE_DIR="${TMPDIR:-/tmp}/nuitka-cache"
- python3 -m nuitka runner.py \
- --standalone \
- --jobs=1 \
- --lto=no \
- --assume-yes-for-downloads \
- --output-filename=api_runner \
- --include-package=cryptography \
- --include-package=numpy \
- --include-package=pandas \
- --include-package=scipy \
- --include-package=matplotlib \
- --enable-plugin=matplotlib \
- --include-module=numpy.testing \
- --nofollow-import-to=tkinter \
- --nofollow-import-to=matplotlib.tests \
- --nofollow-import-to=pandas.tests \
- --nofollow-import-to=scipy.tests \
- --include-data-files=entry*.so=entry*.so \
- --include-data-files=license.lic=license.lic \
- --include-data-files=public_key.pem=public_key.pem
- echo "编译完成: api_runner"
|