33
44cd 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
127apt-get update
138apt-get install -y python3-pip
@@ -17,7 +12,7 @@ conan install --install-folder conan_build .
1712
1813# apply any patches
1914pushd upstream
20- git apply ../upstream_patches/*
15+ git apply --reject --whitespace=fix ../upstream_patches/*
2116popd
2217
2318# build valhalla
@@ -43,8 +38,13 @@ for dep in $deps; do
4338 done
4439done
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..
4744rm -r include/common/valhalla
45+ if [[ -d build ]]; then
46+ rm -r build
47+ fi
4848cp -r upstream/valhalla include/common
4949mv include/common/valhalla/config.h.cmake include/common/valhalla/config.h
5050mv 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
5353cp 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
5756cp -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
8682mkdir -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+
8988for so in dist/* ; do
9089 auditwheel repair --plat manylinux_2_24_x86_64 " ${so} "
9190done
0 commit comments