File: rules

package info (click to toggle)
scikit-optimize 0.10.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,672 kB
  • sloc: python: 10,659; javascript: 438; makefile: 136; sh: 6
file content (28 lines) | stat: -rwxr-xr-x 1,272 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
#!/usr/bin/make -f

export PYBUILD_NAME=scikit-optimize

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

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	pytest
else
	@echo "Skipping tests as per DEB_BUILD_OPTIONS"
endif

override_dh_installdocs:
	https_proxy='127.0.0.1:9' http_proxy='127.0.0.1:9' sphinx-build -b html doc build/sphinx/html

	# Remove or replace privacy-breach URLs with local paths
	find -type f -name "*.html" -exec sed -i 's|https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js|/usr/share/nodejs/mathjax-full/components/src/tex-chtml/tex-chtml.js|g' {} +
	find -type f -name "*.html" -exec sed -i 's|https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css|/usr/share/javascript/bootstrap/css/bootstrap.min.css|g' {} +
	find -type f -name "*.html" -exec sed -i 's|https://code.jquery.com/jquery-3.7.0.js|/usr/share/javascript/jquery/jquery.js|g' {} +
	find -type f -name "*.html" -exec sed -i 's|https://raw.githubusercontent.com/holgern/scikit-optimize/main/media/bo-objective.png|(URL removed)|g' {} +

	# Remove license file
	find -type f -name "LICENSE.txt" -delete

	dh_installdocs -ppython-scikit-optimize-doc --doc-main-package=python-scikit-optimize-doc build/sphinx/html
	dh_installdocs