File: rules

package info (click to toggle)
numcodecs 0.7.3%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 792 kB
  • sloc: python: 4,269; makefile: 217; ansic: 35; sh: 8
file content (38 lines) | stat: -rwxr-xr-x 1,012 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpkg/pkg-info.mk

export DISABLE_NUMCODECS_SSE2=1
export DISABLE_NUMCODECS_AVX2=1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export PYBUILD_NAME=numcodecs

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

override_dh_auto_configure:
	echo "version = '$(DEB_VERSION_UPSTREAM)'" > numcodecs/version.py
	dh_auto_configure

override_dh_auto_build:
	dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	cd docs && \
	PYTHONPATH=$(CURDIR) http_proxy='http://127.0.0.1:9/' https_proxy='https://127.0.0.1:9/' \
	sphinx-build -N -E -T -b html . $(CURDIR)/.pybuild/docs/html/
	rm -rf $(CURDIR)/.pybuild/docs/html/.doctrees
endif

override_dh_auto_clean:
	# does not work due to missing setuptools-scm
	# dh_auto_clean
	$(RM) numcodecs/version.py
	$(RM) -r .pytest_cache .pybuild build
	$(RM) -r numcodecs.egg-info/
	$(RM) numcodecs/*.c
	$(RM) -r $(shell find . -name __pycache__)