File: rules

package info (click to toggle)
python-pkginfo 1.12.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 980 kB
  • sloc: python: 2,142; makefile: 84; sh: 14
file content (32 lines) | stat: -rwxr-xr-x 902 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
#!/usr/bin/make -f
export PYBUILD_NAME=pkginfo
export PYBUILD_AFTER_INSTALL_python3=rm -rf '{destdir}/{install_dir}/pkginfo/tests'

# Work around https://bugs.debian.org/1051837
egg_info := \
	pkginfo/tests/dodgy/namespaced.dodgy-0.1.egg-info \
	pkginfo/tests/funny/funny.egg-info \
	pkginfo/tests/manky/namespaced.manky-0.1.egg-info
define save-egg-info =
for x in $(egg_info); do \
	if [ ! -d "$$x.safe" ]; then cp -a "$$x" "$$x.safe"; fi; \
done
endef
define restore-egg-info =
for x in $(egg_info); do \
	if [ -d "$$x.safe" ]; then rm -rf "$$x"; cp -a "$$x.safe" "$$x"; fi; \
done
endef

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

override_dh_auto_build:
	$(save-egg-info)
	dh_auto_build --buildsystem=pybuild
	LC_ALL=C PYTHONPATH=. http_proxy='http://127.0.0.1:9/' sphinx-build -N -bhtml docs build/sphinx/html

override_dh_auto_clean:
	$(save-egg-info)
	dh_auto_clean
	$(restore-egg-info)