File: rules

package info (click to toggle)
libsass-python 0.20.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 528 kB
  • sloc: python: 3,106; ansic: 620; makefile: 151
file content (40 lines) | stat: -rwxr-xr-x 1,443 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
export DH_VERBOSE=1
export PYTHON_EGG_CACHE=$(CURDIR)/debian/tmp
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export SYSTEM_SASS = 1

%: .libsass-upstream-version
	dh $@ --with python3 --buildsystem=pybuild

.libsass-upstream-version:
	dpkg-query -f '$${Version}\n' -W libsass-dev|sed 's/-.*//' > .libsass-upstream-version

override_dh_auto_build:
	pybuild --build -p "$(shell py3versions -vr)"
	# build doc once
	pybuild -s custom --build -p $(shell py3versions -vd) \
		--build-args="env PYTHONPATH={build_dir} python3 -m sphinx -N -bman docs/ build/man"

override_dh_auto_install:
	dh_auto_install -O--buildsystem=pybuild
	mkdir -p $(CURDIR)/debian/tmp/usr/share/man/man1
	cp $(CURDIR)/build/man/*.1 $(CURDIR)/debian/tmp/usr/share/man/man1/
	sed -i '1c#!/usr/bin/python3' $(CURDIR)/debian/tmp/usr/bin/pysassc

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# Skip DistutilsTestCase.* to not rebuild sass again
	#
	# FIXME : skip test_build_one test_stack_trace_formatting : to reenable once
	# libsass gets past 3.6.4 (see #980628 and upstream issue)
	pybuild -s custom --test -p "$(shell py3versions -vr)" \
		--test-args="cd {build_dir}; \
		{interpreter} -m pytest -k 'not DistutilsTestCase \
		and not test_build_one and not test_stack_trace_formatting' sasstests.py"
endif

override_dh_auto_clean:
	dh_auto_clean -O--buildsystem=pybuild
	rm -fr libsass.egg-info .libsass-upstream-version