mirror of
https://github.com/pocketpy/pocketpy
synced 2026-02-04 22:50:16 +00:00
- Use sys.executable in Python scripts (amalgamate.py, cmake_build.py) instead of hardcoded 'python' - Update shell scripts to prefer python3 over python with fallback - Fix scripts/run_tests.py to detect python3 for CPython benchmarking This fixes the issue where the amalgamation script fails on Linux systems that only have python3 available and no 'python' symlink.
27 lines
549 B
Bash
27 lines
549 B
Bash
set -e
|
|
|
|
# Use python3 if available, otherwise fall back to python
|
|
PYTHON=$(command -v python3 >/dev/null 2>&1 && echo python3 || echo python)
|
|
|
|
$PYTHON amalgamate.py
|
|
|
|
rm -rf build
|
|
mkdir build
|
|
cd build
|
|
|
|
FLAGS="-DPK_BUILD_STATIC_LIB=ON \
|
|
-DPK_ENABLE_OS=OFF \
|
|
-DPK_ENABLE_DETERMINISM=ON \
|
|
-DPK_BUILD_MODULE_LZ4=ON \
|
|
-DPK_BUILD_MODULE_CUTE_PNG=ON \
|
|
-DPK_BUILD_MODULE_MSGPACK=ON \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
"
|
|
|
|
cmake -G Xcode $FLAGS ..
|
|
cmake --build . --config Release
|
|
|
|
cd ../
|
|
|
|
$PYTHON scripts/merge_built_libraries.py build
|