mirror of
https://github.com/pocketpy/pocketpy
synced 2026-02-04 06:30:17 +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.
14 lines
358 B
Bash
14 lines
358 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 prebuild.py
|
|
|
|
SRC=$(find src/ -name "*.c")
|
|
|
|
gcc -pg -Og -std=c11 -Wfatal-errors -o main $SRC src2/main.c -Iinclude -lm -ldl -DNDEBUG -flto
|
|
./main benchmarks/fib.py
|
|
gprof main gmon.out > gprof.txt
|
|
rm gmon.out
|