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
[ Andreas Tille ]
* New upstream version
+ * Link against htslib
-- Andreas Tille <tille@debian.org> Tue, 19 Aug 2014 21:26:37 +0200
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
--- 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
#######################################################
-fix_cleanup_tests.patch
+# fix_cleanup_tests.patch
do_not_use_distribute_setup.patch
-offline-tests.patch
+# offline-tests.patch
+use_external_htslib.patch
--- /dev/null
+Author: Andreas Tille <tille@debian.org>
+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':
DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
TESTPKG := $(DEBPKGNAME)-tests
+DEB_BUILD_OPTIONS := nocheck
+
%:
dh $@ --with python2 --buildsystem=pybuild
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:
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