File: rules

package info (click to toggle)
bmtk 1.1.1%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 204,040 kB
  • sloc: python: 37,064; javascript: 1,998; makefile: 42; sh: 33
file content (35 lines) | stat: -rwxr-xr-x 1,419 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
export LC_ALL=C.UTF-8
export PYBUILD_BEFORE_TEST = cp -r {dir}/bmtk/tests {build_dir}/bmtk/

include /usr/share/dpkg/default.mk

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

execute_after_dh_auto_build: export http_proxy=127.0.0.1:9
execute_after_dh_auto_build: export https_proxy=127.0.0.1:9
execute_after_dh_auto_build:
	sphinx-apidoc -f -o docs/autodocs/source/bmtk/ bmtk
	PYTHONPATH=. python3 -m sphinx -N -bhtml docs/autodocs/source/ build/html # HTML generator

execute_before_dh_install:
	find docs -type f -size 0 -print -exec rm {\} \;
	find build -type f -size 0 -print -exec rm {\} \;
	find . -name "*.json" -exec chmod -x {\} \;
	find . -name "*.nml" -exec chmod -x {\} \;
	find . -name "*.swc" -exec chmod -x {\} \;
	find . -name "*.csv" -exec chmod -x {\} \;
	find . -name "*.h5" -exec chmod -x {\} \;
	find . -name "*.mod" -exec chmod -x {\} \;
	find . -name tutorial_filter_models.html | xargs sed -i '/<img[[:space:]]/ s/alt\=\"[^"]*"//g'
	find . -name tutorial_pointnet_modeling.html | xargs sed -i '/<img[[:space:]]/ s/alt\=\"[^"]*"//g'
	dh_install

EXAMPLES_ROOT = $(CURDIR)/debian/python3-bmtk-examples
EXAMPLES_DIR = $(EXAMPLES_ROOT)/usr/share/doc/python3-bmtk-examples/examples
execute_after_dh_installexamples-indep:
	@ echo "I: Fix examples headers for running as python3 scripts."
	find $(EXAMPLES_DIR)/ \
		-name "*.py" \
		-exec sed -i '1i\#!/usr/bin/python3' {\} \;