Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 91921f9

Browse files
committed
some script updates
1 parent 156f3bd commit 91921f9

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

scripts/build_linux_do.sh

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ set -e
33

44
cd valhalla-py
55

6-
## some cleanup in case the last build failed or so
7-
#git -C upstream checkout .
8-
#rm dist/*
9-
#rm wheelhouse/*
10-
116
# install conan
127
apt-get update
138
apt-get install -y python3-pip
@@ -17,7 +12,7 @@ conan install --install-folder conan_build .
1712

1813
# apply any patches
1914
pushd upstream
20-
git apply ../upstream_patches/*
15+
git apply --reject --whitespace=fix ../upstream_patches/*
2116
popd
2217

2318
# build valhalla
@@ -43,8 +38,13 @@ for dep in $deps; do
4338
done
4439
done
4540

46-
# copy valhalla headers from upstream to include/common
41+
# copy valhalla headers from upstream to include/common after deleting the old ones for safety reasons
42+
# also rm the old setup.py build folder: if the version doesn't change, setuptools simply won't update the .so,
43+
# so we'd get old builds fact.. wtf..
4744
rm -r include/common/valhalla
45+
if [[ -d build ]]; then
46+
rm -r build
47+
fi
4848
cp -r upstream/valhalla include/common
4949
mv include/common/valhalla/config.h.cmake include/common/valhalla/config.h
5050
mv include/common/valhalla/valhalla.h.in include/common/valhalla/valhalla.h
@@ -53,12 +53,8 @@ mv include/common/valhalla/valhalla.h.in include/common/valhalla/valhalla.h
5353
cp upstream/scripts/valhalla_build_config valhalla/valhalla_build_config.py
5454

5555
# copy libvalhalla so it's available for setup.py in its most recent version
56-
# patch the files names of some headers
5756
cp -f upstream/build/src/libvalhalla.a lib/linux
5857

59-
# reset valhalla upstream
60-
git -C upstream checkout .
61-
6258
# make the bindings so we can see which libraries it exactly links to and also for testing
6359
/opt/python/cp310-cp310/bin/pip install -r build-requirements.txt
6460
/opt/python/cp310-cp310/bin/python3 setup.py bdist_wheel
@@ -86,6 +82,9 @@ done
8682
mkdir -p include/linux/valhalla/proto
8783
/usr/bin/protoc --proto_path=upstream/proto --cpp_out=include/linux/valhalla/proto upstream/proto/*.proto
8884

85+
# now checkout the unpatched valhalla version again
86+
git -C upstream checkout .
87+
8988
for so in dist/*; do
9089
auditwheel repair --plat manylinux_2_24_x86_64 "${so}"
9190
done

0 commit comments

Comments
 (0)