File: rules

package info (click to toggle)
ujson 5.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,128 kB
  • sloc: ansic: 2,776; python: 1,502; cpp: 50; makefile: 43; sh: 12
file content (33 lines) | stat: -rwxr-xr-x 837 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export UJSON_BUILD_DC_INCLUDES = /usr/include/double-conversion
export UJSON_BUILD_DC_LIBS     = -ldouble-conversion

PYTHON3=$(shell py3versions -r)

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_build:
	set -e; \
	for python in $(PYTHON3); do \
		$$python setup.py build; \
	done

override_dh_install:
	set -e; \
	for python in $(PYTHON3); do \
		$$python     setup.py install --install-layout=deb --root=$(CURDIR)/debian/python3-ujson; \
	done

override_dh_installdocs:
	dh_installdocs
	dh_installdocs README.md

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	-for python in $(PYTHON3); do \
		LIB=$$(find . | grep 'ujson.*.so' | xargs dirname | paste -sd ':' - ); \
		PYTHONPATH=$$LIB $$python -m pytest -v ; \
	done
endif