42 lines
1.4 KiB
Makefile
Executable File
42 lines
1.4 KiB
Makefile
Executable File
#!/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
|
|
|
|
export SETUPTOOLS_USE_DISTUTILS=stdlib
|
|
|
|
%: .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
|
|
mkdir -p $(CURDIR)/debian/tmp/usr/share/man/man3
|
|
cp $(CURDIR)/build/man/pysassc.1 $(CURDIR)/debian/tmp/usr/share/man/man1/
|
|
cp $(CURDIR)/build/man/libsass.3 $(CURDIR)/debian/tmp/usr/share/man/man3/
|
|
rm $(CURDIR)/debian/tmp/usr/lib/python*/dist-packages/sasstests.py
|
|
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
|
|
pybuild -s custom --test -p "$(shell py3versions -vr)" \
|
|
--test-args="cd {build_dir}; \
|
|
{interpreter} -m pytest -k 'not DistutilsTestCase' sasstests.py"
|
|
endif
|
|
|
|
override_dh_auto_clean:
|
|
dh_auto_clean -O--buildsystem=pybuild
|
|
rm -fr libsass.egg-info .libsass-upstream-version
|