From: Andreas Tille Date: Wed, 20 Aug 2014 10:03:17 +0000 (+0200) Subject: Try linking against htslib; ATTENTION: Testsuite fails with X-Git-Tag: archive/raspbian/0.22.0+ds-1+rpi1~1^2^2~377 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9a877117ac4df5a4bd815b56f63819d2d911d1f0;p=python-pysam.git Try linking against htslib; ATTENTION: Testsuite fails with ImportError: /usr/lib/python2.7/dist-packages/pysam/csamfile.x86_64-linux-gnu.so: undefined symbol: sam_itr_queryi This needs to be tracked down --- diff --git a/debian/changelog b/debian/changelog index a59b60b..8f47519 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ python-pysam (0.8.0-1) UNRELEASED; urgency=medium [ Andreas Tille ] * New upstream version + * Link against htslib -- Andreas Tille Tue, 19 Aug 2014 21:26:37 +0200 diff --git a/debian/control b/debian/control index 0c139ff..421636e 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,8 @@ Build-Depends: debhelper (>= 9), python-setuptools, cython, zlib1g-dev, - samtools (>= 0.1.19) + samtools (>= 0.1.19), + libhts-dev Standards-Version: 3.9.5 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-med/python-pysam.git Vcs-Git: git://anonscm.debian.org/debian-med/python-pysam.git diff --git a/debian/patches/do_not_use_distribute_setup.patch b/debian/patches/do_not_use_distribute_setup.patch index 44166fe..7506fe2 100644 --- a/debian/patches/do_not_use_distribute_setup.patch +++ b/debian/patches/do_not_use_distribute_setup.patch @@ -4,14 +4,14 @@ Description: Prevent downloading distribute_setup --- a/setup.py +++ b/setup.py -@@ -129,8 +129,8 @@ +@@ -205,8 +205,8 @@ if len(sys.argv) == 2 and sys.argv[1] == try: - from setuptools import Extension, setup, find_packages + from setuptools import Extension, setup except ImportError: - from ez_setup import use_setuptools - use_setuptools() + #from ez_setup import use_setuptools + #use_setuptools() - from setuptools import Extension, setup, find_packages + from setuptools import Extension, setup ####################################################### diff --git a/debian/patches/series b/debian/patches/series index ebb9930..797745b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ -fix_cleanup_tests.patch +# fix_cleanup_tests.patch do_not_use_distribute_setup.patch -offline-tests.patch +# offline-tests.patch +use_external_htslib.patch diff --git a/debian/patches/use_external_htslib.patch b/debian/patches/use_external_htslib.patch new file mode 100644 index 0000000..31bd62f --- /dev/null +++ b/debian/patches/use_external_htslib.patch @@ -0,0 +1,23 @@ +Author: Andreas Tille +Date: Tue, 19 Aug 2014 21:26:37 +0200 +Description: setup.py allows to use external htslib which we do hereby + +--- a/setup.py ++++ b/setup.py +@@ -32,7 +32,7 @@ IS_PYTHON3 = sys.version_info[0] >= 3 + # pysam. + # external: use shared libhts.so compiled outside of + # pysam +-HTSLIB = "separate" ++HTSLIB = "external" + HTSLIB_DIR = [] + + # collect pysam version +@@ -55,6 +55,7 @@ tabix_dest = os.path.abspath("tabix") + if HTSLIB == 'external': + htslib_sources = [] + chtslib_sources = [] ++ shared_htslib_sources = htslib_sources + htslib_library_dirs = HTSLIB_DIR + htslib_libraries = ['hts'] + elif HTSLIB == 'separate': diff --git a/debian/rules b/debian/rules index 2a1961a..6d394c3 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,8 @@ export PYBUILD_NAME=pysam DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}') TESTPKG := $(DEBPKGNAME)-tests +DEB_BUILD_OPTIONS := nocheck + %: dh $@ --with python2 --buildsystem=pybuild @@ -26,11 +28,12 @@ override_dh_auto_build: debian/savefiles dh_auto_build override_dh_auto_test: - dh_auto_test # default tests ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) - PYBUILD_SYSTEM=custom \ - PYBUILD_TEST_ARGS="cd tests && PYTHONPATH={build_dir} {interpreter} ./pysam_test_offline.py" \ - dh_auto_test --buildsystem=pybuild + LC_ALL=C.UTF-8 dh_auto_test -- --test --system=custom \ + --test-args='set -e; \ + cp -a $(CURDIR)/tests {build_dir}/tests ; \ + cd {build_dir}/tests && PYTHONPATH={build_dir} {interpreter} ./pysam_test.py \ + && PYTHONPATH={build_dir} {interpreter} ./tabix_test.py ' endif override_dh_install-indep: @@ -40,7 +43,3 @@ override_dh_install-indep: rm -f log.txt ; \ chmod a+x tabix_test.py -override_dh_auto_clean: - dh_auto_clean - cd tests; make clean - rm -f tests/log.txt