python-pysam (0.11.2.2+ds-1) UNRELEASED; urgency=medium
+ [ Afif Elghraoui ]
* Imported Upstream version 0.11.2.2+ds
* Update patches
+ [ Andreas Tille ]
+ * Apply patches suggested by Steve Langasek (thanks for this Steve)
+ Closes: #867017, LP: #1701268
+
-- Afif Elghraoui <afif@debian.org> Sun, 02 Jul 2017 04:09:14 -0400
python-pysam (0.10.0+ds-2) unstable; urgency=medium
--- /dev/null
+Description: Exclude test tyring to access remote ftpserver
+Bug-Debian: https://bugs.debian.org/861496
+Author: Andreas Tille <tille@debian.org>
+Last-Update: Thu, 04 May 2017 12:50:22 +0200
+
+--- a/tests/faidx_test.py
++++ b/tests/faidx_test.py
+@@ -216,21 +216,5 @@ class TestFastxFileWithEmptySequence(uni
+ self.assertEqual(ref_num, l)
+
+
+-class TestRemoteFileFTP(unittest.TestCase):
+- '''test remote access.
+- '''
+-
+- url = "ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/GRCh38_reference_genome/GRCh38_full_analysis_set_plus_decoy_hla.fa"
+-
+-
+- def testFTPView(self):
+- if not checkURL(self.url):
+- return
+- with pysam.Fastafile(self.url) as f:
+- self.assertEqual(
+- len(f.fetch("chr1", 0, 1000)),
+- 1000)
+-
+-
+ if __name__ == "__main__":
+ unittest.main()
+++ /dev/null
-Description: Do not use internal htslib library
-Author: Afif Elghraoui <afif@debian.org>
-Forwarded: not-needed
-Last-Update: 2017-01-26
---- python-pysam.orig/setup.py
-+++ python-pysam/setup.py
-@@ -263,7 +263,7 @@
- suffix = sysconfig.get_config_var('EXT_SUFFIX')
- if not suffix:
- suffix = sysconfig.get_config_var('SO')
--internal_htslib_libraries = [os.path.splitext("chtslib{}".format(suffix))[0]]
-+internal_htslib_libraries = []
-
- internal_tools_libraries = [
- os.path.splitext("csamtools{}".format(suffix))[0],
--- /dev/null
+Description: skip usage() tests on autobuilders
+ The usage() functions check whether stdin is a tty before displaying usage
+ information. Therefore, we should not test this code when running on an
+ autobuilder without a tty.
+ .
+ Clever allocation of a pty from within the test suite itself for purposes
+ of testing this path is left as an exercise for the reader.
+Author: Steve Langasek <steve.langasek@canonical.com>
+
+--- a/tests/samtools_test.py
++++ b/tests/samtools_test.py
+@@ -245,6 +245,7 @@ class SamtoolsTest(unittest.TestCase):
+ self.check_statement(statement)
+
+ @unittest.skipIf(sys.platform == "darwin", "not supported, pattern does not match")
++ @unittest.skipIf(not sys.stdin.isatty(), "skipping usage tests, stdin is not a tty")
+ def testUsage(self):
+ if self.executable == "bcftools":
+ # bcftools usage messages end with exit(1)
--- /dev/null
+Description: fix missing symbols in libcsamtools and libcbcftools libraries
+ Building on Ubuntu fails because a couple of the .sos wind up with
+ unresolved references to symbols found elsewhere in the tree. Fix their
+ linkage so that they load cleanly.
+Author: Steve Langasek <steve.langasek@canonical.com>
+Last-Update: Fri, 28 Jul 2017 10:45:42 -0700
+Bug-Debian: https://bugs.debian.org/867017
+
+--- a/setup.py
++++ b/setup.py
+@@ -463,6 +463,7 @@ cutils = Extension(
+ csamtools = Extension(
+ "pysam.libcsamtools",
+ [source_pattern % "samtools"] +
++ ["pysam/pysam_util.c"] +
+ glob.glob(os.path.join("samtools", "*.pysam.c")) +
+ htslib_sources +
+ os_c_files,
+@@ -484,7 +485,8 @@ cbcftools = Extension(
+ library_dirs=["pysam"] + htslib_library_dirs,
+ include_dirs=["bcftools", "pysam", "."] +
+ include_os + htslib_include_dirs,
+- libraries=external_htslib_libraries + internal_htslib_libraries,
++ libraries=external_htslib_libraries + internal_htslib_libraries + \
++ [os.path.splitext("csamtools{}".format(suffix))[0]],
+ language="c",
+ extra_compile_args=extra_compile_args,
+ define_macros=define_macros
+++ /dev/null
-Description: Disable setting rpath
-Author: Afif Elghraoui <afif@debian.org>
-Forwarded: not-needed
-Last-Update: 2016-03-05
---- python-pysam.orig/cy_build.py
-+++ python-pysam/cy_build.py
-@@ -57,7 +57,7 @@
- ext._init_func(ext)
-
- if not self.inplace:
-- ext.library_dirs.append(os.path.join(self.build_lib, "pysam"))
-+ pass
-
- if sys.platform == 'darwin':
- relative_module_path = ext.name.replace(".", os.sep) + get_config_vars()["SO"]
-@@ -85,6 +85,5 @@
- if not ext.extra_link_args:
- ext.extra_link_args = []
-
-- ext.extra_link_args += ['-Wl,-rpath,$ORIGIN']
-
- build_ext.build_extension(self, ext)
-rpath.patch
-htslib-external-config.patch
+pysam_stdout_linkage.patch
+no-usage-test-without-tty.patch