File: rules

package info (click to toggle)
custodian 2024.10.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 302,240 kB
  • sloc: xml: 774,491; python: 10,437; makefile: 144; sh: 56
file content (35 lines) | stat: -rwxr-xr-x 1,192 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
#!/usr/bin/make -f

# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=custodian

PY3VER_DEF = $(shell py3versions -dv)

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

# don't delete test .orig files
override_dh_clean:
	dh_clean --exclude=tests/files

override_dh_auto_test:
	rm -rf .pybuild/tests
	cp -r tests .pybuild
	# pymatgen is needed for tests but
	# spglib is only available on the default python version
	CUSTODIAN_TEST_DIR=$(CURDIR)/.pybuild/tests  pybuild --test --test-pytest -p $(PY3VER_DEF) \
	    --test-args='-k "not (test_fileman_cpscf_nseg_error or test_gdm_neg_precon_error or test_OptFF or test_first_step)"'

execute_after_dh_auto_build-indep: export http_proxy=127.0.0.1:9
execute_after_dh_auto_build-indep: export https_proxy=127.0.0.1:9
execute_after_dh_auto_build-indep:
	PYTHONPATH=. python3 -m sphinx -N -bhtml \
	docs/ .pybuild/docs/html # HTML generator

execute_after_dh_installdocs:
	for f in `find debian/python-custodian-doc/usr/share/doc/python-custodian-doc/html -name *.html`; do \
	  sed "s|.google-analytics.com/ga.js|privacy/ga.js|g" -i $$f; \
	done