File: rules

package info (click to toggle)
python-enaml 0.19.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,284 kB
  • sloc: python: 31,443; cpp: 4,499; makefile: 140; javascript: 68; lisp: 53; sh: 20
file content (40 lines) | stat: -rwxr-xr-x 2,162 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
#! /usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/pkg-info.mk

export PYBUILD_NAME=enaml
export PYBUILD_TEST_PYTEST=1
export PYBUILD_BEFORE_BUILD={interpreter} {dir}/enaml/core/parser/generate_enaml_parser.py
export PYBUILD_AFTER_INSTALL=rm -f {destdir}/usr/bin/enaml-compileall
export PYBUILD_BEFORE_TEST=\
    /sbin/start-stop-daemon --start --quiet --pidfile $(CURDIR)/custom_xvfb.pid --make-pidfile --background --no-close --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX +render -noreset; \
    sleep 3; \
    /sbin/start-stop-daemon --start --quiet --pidfile $(CURDIR)/custom_herbstluftwm.pid --make-pidfile --background --no-close --exec /usr/bin/herbstluftwm -- --replace; \
    sleep 1
export PYBUILD_AFTER_TEST=\
    /sbin/start-stop-daemon --stop --quiet --pidfile $(CURDIR)/custom_herbstluftwm.pid --remove-pidfile || true; \
    /sbin/start-stop-daemon --stop --quiet --pidfile $(CURDIR)/custom_xvfb.pid --remove-pidfile || true
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DISPLAY=:99.0

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

override_dh_auto_build:
	dh_auto_build
	pod2man -c "Enaml documentation" --release "Enaml $(DEB_VERSION_UPSTREAM)" --section 1 debian/enaml-run.pod > debian/enaml-run.1
	pod2man -c "Enaml documentation" --release "Enaml $(DEB_VERSION_UPSTREAM)" --section 1 debian/utils/enamlclean.pod > debian/utils/enamlclean.1
	pod2man -c "Enaml documentation" --release "Enaml $(DEB_VERSION_UPSTREAM)" --section 1 debian/utils/enamlcompile.pod > debian/utils/enamlcompile.1

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	http_proxy='http://127.0.0.1:9/' PYTHONPATH=$(CURDIR)/.pybuild/cpython3_$(shell py3versions -vd)_enaml/build:$(CURDIR)/tools/pygments/ python3 -P -m sphinx -N -bhtml docs/source/ debian/python-enaml-doc/usr/share/doc/python-enaml-doc/html/
	jdupes -rl debian/python-enaml-doc/usr/share/doc/python-enaml-doc/html/
	dh_sphinxdoc
endif

execute_after_dh_installexamples:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	if test -d debian/python-enaml-doc/usr/share/doc; then jdupes -rl debian/python-enaml-doc/usr/share/doc; fi
endif