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 45
|
#!/usr/bin/make -f
DH_VERBOSE := 1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export PYBUILD_NAME=pybedtools
export MATPLOTLIBRC=$(CURDIR)/debian/
export PYBUILD_BEFORE_TEST=
ifneq ($(PYBUILD_AUTOPKGTEST), 1)
export PYBUILD_BEFORE_TEST+= cp {dir}/debian/mpl-expected.png {build_dir}/pybedtools/test/ ;
endif
export PYBUILD_TEST_ARGS=-k "not test_chromsizes" --pyargs pybedtools
export PYBUILD_AFTER_TEST=cd {dir}/docs ; PYTHONPATH={build_dir} {interpreter} -m sphinx -b doctest -d build/doctrees source build/doctest
defaultpython=$(shell py3versions -dv)
%:
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
execute_after_dh_auto_build:
cd docs ; PYTHONPATH=$(shell pybuild --pyver ${defaultpython} --print build_dir | awk '-F: ' '{print $$2}') python${defaultpython} -m sphinx -N -b html source html
execute_after_dh_install:
rm -f debian/python3-pybedtools/usr/lib/python3*/dist-packages/pybedtools/test/prevent_open_file_regression \
debian/python3-pybedtools/usr/lib/python3*/dist-packages/foo.bed \
debian/python3-pybedtools/usr/lib/python3*/dist-packages/genome.txt
override_dh_auto_clean:
/bin/rm -rf fakehome .eggs .pybuild .pytest_cache
/bin/rm -rf debian/python3-pybedtools debian/files
/bin/rm -rf pybedtools.egg-info
/bin/rm -rf pybedtools/scripts/__pycache__/
/bin/rm -rf pybedtools/contrib/__pycache__/
/bin/rm -rf pybedtools/__pycache__/
find pybedtools -name "*.so" -o -name "*.o" | xargs -r rm
rm -rf build
rm -rf docs/build docs/*.bed docs/*.genome
rm -rf dist
/bin/rm -rf pybedtools/cbedtools.cpp pybedtools/featurefuncs.cpp
find docs/source/autodocs/ -name "*.rst" | xargs -r /bin/rm
# dh_auto_clean
|