File: rules

package info (click to toggle)
hy 0.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,288 kB
  • ctags: 505
  • sloc: python: 3,949; makefile: 232; sh: 52
file content (52 lines) | stat: -rwxr-xr-x 1,327 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/make -f

export PYBUILD_NAME := hy

# have to set HOME because rply wants to write into ~/.cache/rply
export HOME := $(CURDIR)/fake-home

# TODO figure out why the tests in python3 fail via pybuild, but pass after install
export PYBUILD_DISABLE_python3 := test

BUILD_DATE=$(shell dpkg-parsechangelog -S Date | LC_ALL=C date -u '+%B %d, %Y' -f -)

%:
	dh $@ --with python2,python3 --buildsystem pybuild

override_dh_auto_build:
	dh_auto_build
	make -C docs \
		SPHINXOPTS='-D today="$(BUILD_DATE)"' \
		man
	# TODO html docs (and install them in hy-doc or something)

override_dh_auto_test:
	# tests use "README.md" from the original source for IO testing
	dh_auto_test -- \
		--before-test 'cp {dir}/README.md {build_dir}' \
		--test-args ' \
			--exclude test_botsbuildbots \
			--ignore-files test_bin.py \
		' \
		--after-test 'rm {build_dir}/README.md'

override_dh_auto_install:
	dh_auto_install
	for bin in debian/python-hy/usr/bin/*; do \
		mv -v $$bin $${bin}2; \
	done
	for bin in debian/python3-hy/usr/bin/*; do \
		mv -v $$bin $${bin}3; \
	done

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_auto_clean:
	dh_auto_clean
	# sphinx
	rm -rf docs/_build
	# clean out our HOME-hack leftovers
	rm -rf fake-home
	# egg-info! (not shipped at all in upstream tarballs)
	rm -rf hy.egg-info