File: rules

package info (click to toggle)
bcolz 1.2.1%2Bds2-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 4,612 kB
  • sloc: python: 9,691; makefile: 150; sh: 26; ansic: 11
file content (47 lines) | stat: -rwxr-xr-x 1,312 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
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/make -f
export DH_VERBOSE=1
export PYBUILD_NAME=bcolz
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export BLOSC_DIR=/usr

# preset version for setuptools-scm to prevent "1.1.0+ds1" etc. from Git tags
include /usr/share/dpkg/pkg-info.mk
VERSION_UPSTREAM = $(shell echo '$(DEB_VERSION_UPSTREAM)' | sed -e 's/\+[^+]*//')
export SETUPTOOLS_SCM_PRETEND_VERSION = $(VERSION_UPSTREAM)

%:
ifneq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
	dh $@ --with python3 --buildsystem=pybuild

else
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild
endif

override_dh_auto_install:
	dh_auto_install
ifeq (,$(filter nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(shell pybuild --print build_dir --interpreter python3) \
	http_proxy='127.0.0.1:9' sphinx-build -N docs/ debian/bcolz-doc/usr/share/doc/bcolz-doc/html/
endif

override_dh_installdocs:
ifeq (,$(filter nodoc, $(DEB_BUILD_OPTIONS)))
	for i in ANNOUNCE DISK_FORMAT_v1 README THANKS; \
	do rst2html -r 5 $$i.rst .pybuild/$$i.html; \
	LANG=C.UTF-8 links -dump .pybuild/$$i.html > $$i; done
endif
	dh_installdocs -A README THANKS

override_dh_installchangelogs:
	dh_installchangelogs RELEASE_NOTES.rst

override_dh_compress:
	dh_compress -X.ipynb

override_dh_gencontrol:
	dh_numpy3
	dh_gencontrol

override_dh_auto_clean:
	dh_auto_clean
	rm -f bcolz/carray_ext.c