File: rules

package info (click to toggle)
bepasty 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 836 kB
  • sloc: python: 2,976; javascript: 1,468; makefile: 172; sh: 30
file content (35 lines) | stat: -rwxr-xr-x 1,111 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
35
#! /usr/bin/make -f

export PYBUILD_NAME=bepasty
#export PYBUILD_DISABLE=test
%:
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_clean:
	dh_auto_clean || true
	if [ -f debian/old_version.py ]; then \
		mv debian/old_version.py src/bepasty/_version.py ; \
	fi
	if [ -f debian/old_SOURCES.txt ]; then \
		mv debian/old_SOURCES.txt src/bepasty.egg-info/SOURCES.txt ; \
	fi

override_dh_auto_build:
	cp src/bepasty/_version.py debian/old_version.py
	cp src/bepasty.egg-info/SOURCES.txt debian/old_SOURCES.txt
	dh_auto_build
	mkdir src/bepasty/static/css
	for S in $$(pygmentize -L style | awk -F "[ :]" '/^\*/ { print $$2}') ; \
	do \
	    pygmentize -f html -S $$S > src/bepasty/static/css/$$S.css ; \
	done
	cd docs ; make html PYTHONPATH=../src ; cd -
	cd debian ; rst2man bepasty-server.1.rst bepasty-server.1 ; cd -
	cd debian ; rst2man bepasty-object.1.rst bepasty-object.1 ; cd -

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	set -ex; for py in `py3versions --supported 2>/dev/null`; do \
	    $${py} -m pytest -m "not needs_server" src/ ; \
	done
endif