File: rules

package info (click to toggle)
python-astropy 1.3-8
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 44,256 kB
  • ctags: 35,559
  • sloc: ansic: 160,360; python: 137,322; sh: 11,493; lex: 7,638; yacc: 4,956; xml: 1,796; makefile: 474; cpp: 364
file content (62 lines) | stat: -rwxr-xr-x 1,602 bytes parent folder | download | duplicates (2)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/make -f

PYTHON2:=$(shell pyversions -vr)
PYTHON3:=$(shell py3versions -vr)

# set the MPLCONFIGDIR to avoid writing into non writable location
export HOME=$(CURDIR)/build
export MPLCONFIGDIR=$(CURDIR)/build

# Prevent setuptools/distribute from accessing the internet.
export http_proxy = http://127.0.9.1:9

%:
	dh $@ --with python2,python3,sphinxdoc

build-python%:
	python$* setup.py build --use-system-libraries

# We need to build python2 first, since cython is currently only available for 
# python2, and we need cython to (re-) generate some of the C files.
override_dh_auto_build: $(PYTHON2:%=build-python%) $(PYTHON3:%=build-python%)
	#dh_auto_build

install-python%:
	python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb

override_dh_auto_install: $(PYTHON3:%=install-python%)
	dh_auto_install

override_dh_auto_build:
	dh_auto_build -- --use-system-libraries

override_dh_shlibdeps:
	dh_shlibdeps
	dh_numpy
	dh_numpy3

override_dh_installdocs-indep:
	python setup.py build_sphinx
	dh_installdocs

override_dh_sphinxdoc-arch:
	# sphinxdoc is only needed on indep and does not work here.

override_dh_installchangelogs:
	dh_installchangelogs docs/changelog.rst

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build astropy.egg-info
	rm -rf astropy_helpers-*.egg
	rm -rf docs/_build docs/_generated

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
test-python%:
	python$* setup.py test -vv --args -vv

override_dh_auto_test: $(PYTHON2:%=test-python%) $(PYTHON3:%=test-python%)
endif

override_dh_strip_nondeterminism:
	dh_strip_nondeterminism -Xinvalid.dat.gz