File: rules

package info (click to toggle)
psycopg2 2.7.7-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,240 kB
  • sloc: ansic: 13,904; python: 11,965; makefile: 187; sh: 160
file content (36 lines) | stat: -rwxr-xr-x 1,052 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
36
#!/usr/bin/make -f

export PYBUILD_NAME=psycopg2
DEFAULT_PYTHON3 = $(shell py3versions -d)
DEFAULT_BUILDIR = $(shell $(DEFAULT_PYTHON3) -c 'from distutils.command.build import build; from distutils.core import Distribution; b = build(Distribution()); b.finalize_options(); print(b.build_platlib)')
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build -a

build-indep:
	$(DEFAULT_PYTHON3) setup.py build
	export PYTHONPATH=$(CURDIR)/$(DEFAULT_BUILDIR)/; \
	cd $(CURDIR)/doc/src; \
	make -f Makefile html; \
	make -f Makefile text; \
	rm -f _build/text/license.txt

override_dh_link:
	rm -rf $(CURDIR)/debian/python-psycopg2-dbg/usr/share/doc/python-psycopg2-dbg
	rm -rf $(CURDIR)/debian/python3-psycopg2-dbg/usr/share/doc/python3-psycopg2-dbg
	dh_link

override_dh_strip:
	dh_strip --no-automatic-dbgsym

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(CURDIR)/doc/src/_build
	rm -rf $(CURDIR)/build

override_dh_auto_test:
	# Needs running pg server