Skip to content

Commit 7b0a425

Browse files
committed
add build.sh
1 parent 2f73ea8 commit 7b0a425

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

build.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
"$python_exe" -m nuitka --assume-yes-for-downloads --mode=onefile --output-dir=build src/hijackcompiler.py
4+
5+
for i in src/transforms/*.py; do
6+
"$python_exe" -m nuitka --assume-yes-for-downloads --mode=module --output-dir=build $i
7+
done
8+
9+
mkdir dist
10+
mkdir dist/transforms
11+
12+
if [ "$RUNNER_OS" == "Linux" ]; then
13+
for i in build/*.so; do
14+
cp $i dist/transforms
15+
done
16+
chmod +x build/hijackcompiler.bin
17+
cp build/hijackcompiler.bin dist/hijackcompiler
18+
19+
elif [ "$RUNNER_OS" == "Windows" ]; then
20+
for i in build/*.pyd; do
21+
cp $i dist/transforms
22+
done
23+
cp build/hijackcompiler.exe dist/
24+
else
25+
echo "$RUNNER_OS not supported"
26+
exit 1
27+
fi
28+
29+

0 commit comments

Comments
 (0)