#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all export PYBUILD_NAME = onnx export PYBUILD_DISABLE_python2 = 1 %: dh $@ -Spybuild --with python3 override_dh_auto_configure: find . -type f -name '*.py' -exec \ sed -i -e 's@#!/usr/bin/env python@#!/usr/bin/python3@' '{}' + dh_auto_configure -Scmake -- \ -DBUILD_SHARED_LIBS=ON \ -DPYTHON_EXECUTABLE=python3 dh_auto_configure -Spybuild override_dh_auto_build: : # so things won't be built again while installing override_dh_auto_test: : override_dh_auto_install: dh_auto_install -Scmake dh_auto_install -Spybuild # Remove duplicatd test data from include directory -$(RM) -rf debian/tmp/usr/include/onnx/backend/test/data # Use the test data installed in python package as the main copy mkdir -v -p debian/libonnx-testdata/usr/share/libonnx-testdata/ mv debian/python3-onnx/usr/lib/$(shell py3versions -d)/dist-packages/onnx/backend/test/data \ debian/libonnx-testdata/usr/share/libonnx-testdata/ -$(RM) -rf debian/python3-onnx/usr/lib/python3*/dist-packages/onnx/backend/test/data override_dh_missing: dh_missing --fail-missing