File: rules

package info (click to toggle)
sasmodels 1.0.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,980 kB
  • sloc: python: 25,717; ansic: 7,368; makefile: 148; sh: 63
file content (50 lines) | stat: -rwxr-xr-x 1,528 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
#!/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/
export SAS_DLL_PATH=$(CURDIR)/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 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 {} +

execute_before_dh_auto_build:
	mkdir -p $(POCL_CACHE_DIR) $(SAS_MODELPATH) $(SAS_MODELPATH_COMPILED)
	PYTHONPATH=. ./debian/compile_models

execute_after_dh_auto_build-indep:
	+PYTHON=python3 $(MAKE) -C doc html
	ln -sf /usr/share/javascript/mathjax doc/_build/html/_static/

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