Skip to content

Commit

Permalink
run.sh: Fix rebuilding C modules on every run
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j committed Sep 21, 2024
1 parent 09aa752 commit 7c29dd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ cd "$(dirname "$0")"

# Check if c modules are compiled and actual
for cmod in "${C_MODULES[@]}"; do
expected_version=\$C_VERSION_${cmod}
expected_version_str="C_VERSION_${cmod}"
expected_version=$(eval echo "\$${expected_version_str}")
if ! reported_version=$(PYTHONPATH="." python3 -c 'import os, ctypes; lib=ctypes.CDLL("./'lib${cmod}'.so"); print(lib.'${cmod}'_module_version())'); then
echo -e "${Purple}Failed to check module version for ${Yellow}${cmod}${Purple}, rebuilding modules. If this message only shows once, this is normal!${NoColor}"
fi
Expand Down

0 comments on commit 7c29dd0

Please sign in to comment.