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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
#export PYBUILD_NAME=biopython
#export PYBUILD_DESTDIR_python2=debian/python-biopython/
#export PYBUILD_DESTDIR_python3=debian/python3-biopython/
BUILDARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
# If `$(CURDIR)/setup.py test` would be called these tests need to be excluded since they require to be online
#EXCLUDEONLINE=Entrez_online HotRand NCBI_qblast SCOP_online SeqIO_online TogoWS
# Since `run_texts.py --online` is used the test requiring online connections are excluded by the test suite
EXCLUDEONLINE=
# avoid PAML_tools and EmbossPhylipNew since paml resp. embassy-phylip are non-free
# This would not trigger a failure but bloats the build log with irrelevant noise
EXCLUDENONFREE=PAML_tools EmbossPhylipNew
# avoid testing tools that are not packaged for Debian yet (or will never be packaged since they might be outdated)
# This would not trigger a failure but bloats the build log with irrelevant noise
EXCLUDENOTPACKAGED=MSAProbs_tool NACCESS_tool PopGen_DFDist PopGen_FDist PopGen_GenePop PopGen_GenePop_EasyController PopGen_SimCoal XXmotif_tool
# avoid amd64 only tools on other architectures
ifeq ($(BUILDARCH),amd64)
EXCLUDEARCHamd64=
else
EXCLUDEARCHamd64=BWA_tool raxml_tool
endif
# avoid tests requiring data base connections if no server is running while we are doing the build
# This would not trigger a failure but bloats the build log with irrelevant noise
EXCLUDEDATABASE=BioSQL_MySQLdb BioSQL_psycopg2
# The following test works only with python-rdflib (>= 4)
# If python-rdflib (>= 4) then do not exclude it - otherwise we exclude this test
EXCLUDERDFLIB=$(shell if dpkg --compare-versions `dpkg -l python-rdflib | grep ^ii | sed 's/ii *python-rdflib *\([-.0-9]\+\) *.*/\1/'` gt 4 ; then echo ""; else echo "Phylo_CDAO" ; fi)
# FIXME: These tests are failing for unknown reasons and this needs to be investigated
# specifically since test_ColorSpiral and test_trie are running when called manually
# .
# Regarding the Tutorial test it depends from a fix for python-reportlab (see #745985)
EXCLUDEFAILINGTESTS=GenomeDiagram Fasttree_tool Mafft_tool Tutorial ColorSpiral trie
# FIXME: Currently it is not sure for what architecture samtools will be available
# to anable a smooth migration to testing the build-dependency will be dropped
# for the moment
EXCLUDEPACKAGEINFLUX=samtools_tool
%:
dh $@ --with python2,python3 --buildsystem=pybuild
override_dh_auto_install:
dh_auto_install
dh_numpy -ppython-biopython
dh_numpy3 -ppython3-biopython
override_dh_auto_test:
ifeq ($(BUILDARCH),mips)
echo "***************************************************************************"
echo "* Attention: Build time tests for mips architecture are skipped. *"
echo "* The reason is that the tests are known to fail for Python3 and the *"
echo "* effort to simply run only for Python 2.7 seems to be error prone. *"
echo "* Upstream is working on a solution so this should be dropped for *"
echo "* next upstream version. See: *"
echo "* http://mailman.open-bio.org/pipermail/biopython/2014-August/015383.html *"
echo "***************************************************************************"
else
mkdir -p Tests_avoid
if [ "$(EXCLUDERDFLIB)" != "" ] ; then echo "You might like to install python-rdflib from experimental to run Phylo_CDAO test" ; else echo "Phylo_CDAO will be done"; fi
for avoid in $(EXCLUDEONLINE) $(EXCLUDENONFREE) $(EXCLUDENOTPACKAGED) $(EXCLUDEARCHamd64) $(EXCLUDEDATABASE) $(EXCLUDERDFLIB) $(EXCLUDEFAILINGTESTS) $(EXCLUDEPACKAGEINFLUX) \
; do \
mv Tests/test_$${avoid}.py Tests_avoid ; \
done
# For the doc package we need a clean testsuite without all the remaining files. So keep a clean copy here
mkdir -p debian/tmp_tests
cp -a Tests debian/tmp_tests
# remove duplicated file
rm -f debian/tmp_tests/Tests/Quality/example.fastq.gz
# We also keep the tests we need to avoid for later inspection
cp -a Tests_avoid debian/tmp_tests
# in the Debian package dialign it is not needed to set DIALIGN2_DIR but the test is verifying this dir
# to run the EMBOSS test test_Emboss also requires to have the environment variable EMBOSS_ROOT set
LC_ALL=C.UTF-8 dh_auto_test -- --test --system=custom \
--test-args='set -e; \
mkdir -p {build_dir}/home; \
mkdir -p {build_dir}/Doc; \
cp -a Doc/Tutorial.tex {build_dir}/Doc; \
cp -a Tests {build_dir}; \
cd {build_dir}/Tests; \
env DIALIGN2_DIR=/usr/share/dialign EMBOSS_ROOT=/usr/lib/emboss HOME={build_dir}/home {interpreter} run_tests.py --offline'
mv Tests_avoid/* Tests
rmdir Tests_avoid
endif
override_dh_installdocs-indep:
dh_installdocs
find debian -name __pycache__ -type d | xargs rm -rf
find debian -name example.fastq.gz
# dh_installdocs seems to refuse copying zero length files (for instance Tests/Blast/tab_2226_tblastn_002.txt) but these are needed for the tests as well
cp -a debian/tmp_tests/* $(CURDIR)/debian/python-biopython-doc/usr/share/doc/python-biopython-doc/
override_dh_auto_clean:
dh_auto_clean
if [ -d Tests_avoid ] ; then \
mv Tests_avoid/* Tests ; \
rmdir Tests_avoid ; \
fi
rm -rf debian/tmp_tests
|