File: rules

package info (click to toggle)
python-xarray 0.11.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 6,476 kB
  • sloc: python: 37,552; makefile: 231; sh: 1
file content (40 lines) | stat: -rwxr-xr-x 1,137 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
#!/usr/bin/make -f

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

export PYBUILD_NAME=xarray
PY3VERS:= $(shell py3versions -s)

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

override_dh_auto_clean:
	dh_auto_clean
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
	$(MAKE) -C doc clean
endif

override_dh_auto_install: $(PYTHON3:%=install-python%)
	dh_auto_install
	find debian/python3-xarray -name '*.idx' -exec chmod -x {} \;

override_dh_auto_build:
	http_proxy=127.0.0.1:9 https_proxy=127.0.0.1:9 dh_auto_build
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
	PYTHONPATH=$(CURDIR) $(MAKE) -C doc html
endif

# No dask for python2, so skip
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	for p in $(PY3VERS); do \
		PY3VERNUM=`echo $$p | sed -e 's/python//' `; \
		pybuild --test --test-pytest -i $$p -p $$PY3VERNUM  ;  \
		done
endif

override_dh_sphinxdoc:
	dh_sphinxdoc --exclude=MathJax.js
	mv debian/python-xarray-doc/usr/share/doc/python-xarray/html debian/python-xarray-doc/usr/share/doc/python-xarray-doc
	rmdir debian/python-xarray-doc/usr/share/doc/python-xarray