File: rules

package info (click to toggle)
python-pyscss 1.3.5-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 6,324 kB
  • ctags: 1,780
  • sloc: python: 12,626; ansic: 1,544; makefile: 157; sh: 30; xml: 4
file content (44 lines) | stat: -rwxr-xr-x 1,522 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
#!/usr/bin/make -f

PYTHONS:=$(shell pyversions -vr)
PYTHON3S:=$(shell py3versions -vr)

UPSTREAM_GIT = git://github.com/Kronuz/pyScss.git
-include /usr/share/openstack-pkg-tools/pkgos.make

MANPAGES=python2-pyscss.1 python3-pyscss.1 python2-less2scss.1 python3-less2scss.1
DB2MAN=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
XP=xsltproc --nonet --novalid

export PYBUILD_NAME=pyscss

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

override_dh_install: $(MANPAGES)
	dh_install -ppython-pyscss
	mv $(CURDIR)/debian/python-pyscss/usr/bin/pyscss $(CURDIR)/debian/python-pyscss/usr/bin/python2-pyscss
	mv $(CURDIR)/debian/python-pyscss/usr/bin/less2scss $(CURDIR)/debian/python-pyscss/usr/bin/python2-less2scss
	dh_install -ppython3-pyscss
	mv $(CURDIR)/debian/python3-pyscss/usr/bin/pyscss $(CURDIR)/debian/python3-pyscss/usr/bin/python3-pyscss
	mv $(CURDIR)/debian/python3-pyscss/usr/bin/less2scss $(CURDIR)/debian/python3-pyscss/usr/bin/python3-less2scss

python2-pyscss.1 python3-pyscss.1: debian/pyscss.dbk
	$(XP) $(DB2MAN) $< && mv pyscss.1 $@

python2-less2scss.1 python3-less2scss.1: debian/less2scss.dbk
	$(XP) $(DB2MAN) $< && mv less2scss.1 $@

override_dh_clean:
	dh_clean
	rm -f $(MANPAGES)
	rm -rf build
	find . -iname '*.pyc' -delete

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	set -e ; for pyvers in $(PYTHONS) $(PYTHON3S); do \
		echo "=========== running tests with python$$pyvers ==========="; \
		python$$pyvers -m pytest ; \
	done
endif