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
export DH_VERBOSE = 1
export PYBUILD_NAME=emperor
export PYBUILD_AFTER_BUILD=python{version} setup.py develop --install-dir {build_dir}; \
export PYTHONPATH={build_dir}:$(PYTHONPATH); \
$(MAKE) -C doc html; \
cp -rv {dir}/tests/test_data {build_dir}/tests
export PYBUILD_BEFORE_INSTALL=rm -rvf {build_dir}/emperor.egg* \
{build_dir}/site.py {build_dir}/easy-install.pth \
{build_dir}/f* {build_dir}/pasteurize {build_dir}/*.py
%:
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
override_dh_installdocs:
dh_installdocs
p="debian/python3-emperor-doc/usr/share/doc/python3-emperor/jsdoc" ; \
if [ -d "$$p" ]; then \
echo "I: Removing date from jsdoc signature line for reproducible builds in $$p" ; \
sed -i \
's%Documentation generated by.*%Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a>.%' \
`find $$p -name "*.html"` ; \
else \
echo "W: Directory '$$p' not found." ; \
fi
override_dh_auto_test:
if [ ! -d tests/javascript_tests/qunit/ ]; then \
mkdir tests/javascript_tests/qunit ; \
cd tests/javascript_tests/qunit/ && ln -s /usr/share/javascript/qunit/qunit.css qunit-min.css \
&& ln -s /usr/share/javascript/qunit/qunit.min.js qunit-min.js ; \
fi
PYTHONPATH=.pybuild/`find .pybuild -name cpython3*_emperor -type d|head -n 1`/build pytest-3
override_dh_auto_clean:
dh_auto_clean
cd $(CURDIR)/doc && make clean
rm -fr tests/javascript_tests/qunit
# since packaging seems problematic
rm -rf debian/python3-emperor-doc debian/python3-emperor-doc.substvars
|