-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild_python_wheel_docker.sh
More file actions
executable file
·40 lines (32 loc) · 1.04 KB
/
build_python_wheel_docker.sh
File metadata and controls
executable file
·40 lines (32 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
set -e -x
cd /root
git clone https://github.com/DeadCodeProductions/program-markers.git
cd program-markers
git checkout "$REVISION"
mkdir build
cd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -fPIC" \
-DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++" \
-DCMAKE_SHARED_LINKER_FLAGS="-static-libgcc -static-libstdc++"
ninja
cd ..
cp build/bin/program-markers python_src/program_markers
cp setup.py.in setup.py
sed -i "s~THIS_DIR~$(pwd)~g" setup.py
"/opt/python/cp310-cp310/bin/python" -m build -w -o wheelhouse
"/opt/python/cp311-cp311/bin/python" -m build -w -o wheelhouse
"/opt/python/cp312-cp312/bin/python" -m build -w -o wheelhouse
function repair_wheel {
wheel="$1"
if ! auditwheel show "$wheel"; then
echo "Skipping non-platform wheel $wheel"
else
auditwheel repair "$wheel" -w /io/wheelhouse/
fi
}
for whl in wheelhouse/*.whl; do
repair_wheel "$whl"
done
rm setup.py