File: rules

package info (click to toggle)
pyswarms 1.3.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 33,556 kB
  • sloc: python: 4,109; makefile: 240; sh: 32
file content (34 lines) | stat: -rwxr-xr-x 880 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
#!/usr/bin/make -f
#export DH_VERBOSE = 1

export PYBUILD_NAME=pyswarms

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

override_dh_auto_build:
	dh_auto_build
	# Needed by python-pyswarms-doc.docs regardless of if we build or not
	mkdir -p docs/_build
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(CURDIR) \
	http_proxy='127.0.0.1:9' \
	https_proxxy='127.0.0.1:9' \
	$(MAKE) -C docs html
endif

override_dh_auto_install:
	# Stray file that gets generated during build and test
	rm -f report.log .pybuild/*/build/report.log docs/report.log
	dh_auto_install

override_dh_installdocs:
	dh_installdocs --package=python-pyswarms-doc --doc-main-package=python3-pyswarms
	dh_installdocs --remaining-packages

override_dh_auto_clean:
	dh_auto_clean
	rm -rf .pytest_cache
ifneq (,$(filter python-pyswarms-doc,$(shell dh_listpackages)))
	$(MAKE) -C docs clean
endif