File: rules

package info (click to toggle)
pgxnclient 1.3.2-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 668 kB
  • sloc: python: 3,545; sh: 71; makefile: 53
file content (34 lines) | stat: -rwxr-xr-x 1,237 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/make -f

export PYTHON_VERSION=3

override_dh_auto_test:
	# disabled for now:
	# /usr/lib/python3/dist-packages/py/_path/local.py:724: in pyimport
	#    raise self.ImportMismatchError(modname, modfile, self)
	#E   py._path.local.LocalPath.ImportMismatchError: ('pgxnclient.api', '/home/myon/projects/postgresql/pgxnclient/pgxnclient/build/lib/pgxnclient/api.py', local('/home/myon/projects/postgresql/pgxnclient/pgxnclient/pgxnclient/api.py'))

	## HOME points to a non-existent directory on buildds, but the tests want it
	#TMPDIR=$$(mktemp --tmpdir -d pgxnclient.test.XXXXXX); \
	#trap "rm -rf $$TMPDIR" 0 2 3 15; \
	#HOME=$$TMPDIR dh_auto_test

override_dh_install:
	python3 setup.py install --prefix=/usr --root=$(CURDIR)/debian/pgxnclient --install-layout=deb

override_dh_auto_clean:
	dh_auto_clean
	find pgxnclient -name '*.pyc' | xargs -r rm

override_dh_installman:
	PATH=$(CURDIR)/bin:$(PATH) \
	PYTHONPATH=$(CURDIR) \
	help2man --no-discard-stderr --no-info \
		--name "Interact with the PostgreSQL Extension Network" \
		--version-string=$(shell dpkg-parsechangelog -S Version) \
		pgxnclient > pgxnclient.1
	grep DESCRIPTION pgxnclient.1 # check manpage generation worked
	dh_installman

%:
	dh $@ --with python3