File: rules

package info (click to toggle)
onnx 1.7.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 28,940 kB
  • sloc: cpp: 29,203; python: 20,948; ansic: 3,441; makefile: 26; sh: 26
file content (35 lines) | stat: -rwxr-xr-x 1,135 bytes parent folder | download
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
#!/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