File: rules

package info (click to toggle)
sasmodels 0.99-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 14,760 kB
  • sloc: python: 22,292; ansic: 6,140; makefile: 149; sh: 91
file content (49 lines) | stat: -rwxr-xr-x 1,449 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
#!/usr/bin/make -f

#export DH_VERBOSE = 1

export PYBUILD_NAME=sasmodels

# enable additional hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie

# opencl needs somewhere to cache compiled objects
export POCL_CACHE_DIR=$(CURDIR)/.cache/
export XDG_CACHE_HOME=$(CURDIR)/.cache/
# and also tell pyopencl not to cache
export PYOPENCL_NO_CACHE=1
# and give somewhere for sasmodels to look for models
export SAS_MODELPATH=$(CURDIR)/.sasmodels/
export SAS_MODELPATH_COMPILED=./sasmodels/compiled_models/

# stop matplotlib from thinking it should display plots
export MPLBACKEND=Agg
# Tell sasmodels not to use OpenCL on the builder
export SAS_OPENCL=none

# ensure test logs don't get accidentally installed
export PYBUILD_AFTER_INSTALL=rm -rf {build_dir}/logs
# list tests as they run
export PYBUILD_TEST_ARGS=-v

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

override_dh_clean:
	dh_clean
	make -C doc clean
	rm -rf $(POCL_CACHE_DIR) $(SAS_MODELPATH) $(SAS_MODELPATH_COMPILED)
	rm -rf doc/guide/models/
	rm -rf sasmodels.egg-info
	find -name logs -type d -exec rm -rf {} +

override_dh_auto_build:
	mkdir -p $(POCL_CACHE_DIR) $(SAS_MODELPATH) $(SAS_MODELPATH_COMPILED)
	PYTHONPATH=. ./debian/compile_models
	dh_auto_build
	+$(MAKE) -C doc html
	ln -sf /usr/share/javascript/mathjax doc/_build/html/_static/

override_dh_auto_install:
	dh_auto_install
	rm -rf debian/*/usr/lib/python*/*packages/sasmodels/compiled_models