[med-svn] [python-pysam] 01/01: Apply patches suggested by Steve Langasek

Andreas Tille tille at debian.org
Sat Jul 29 06:30:54 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository python-pysam.

commit 5b2d896fbcde6be00b852c0b1753a71c25d83de2
Author: Andreas Tille <tille at debian.org>
Date:   Sat Jul 29 08:30:28 2017 +0200

    Apply patches suggested by Steve Langasek
---
 debian/changelog                                   |  5 ++++
 ...de_test_tyring_to_access_remote_ftpserver.patch | 29 ++++++++++++++++++++++
 debian/patches/htslib-external-config.patch        | 15 -----------
 debian/patches/no-usage-test-without-tty.patch     | 19 ++++++++++++++
 debian/patches/pysam_stdout_linkage.patch          | 28 +++++++++++++++++++++
 debian/patches/rpath.patch                         | 22 ----------------
 debian/patches/series                              |  4 +--
 7 files changed, 83 insertions(+), 39 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 31951a4..2dad5e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,13 @@
 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 at debian.org>  Sun, 02 Jul 2017 04:09:14 -0400
 
 python-pysam (0.10.0+ds-2) unstable; urgency=medium
diff --git a/debian/patches/exclude_test_tyring_to_access_remote_ftpserver.patch b/debian/patches/exclude_test_tyring_to_access_remote_ftpserver.patch
new file mode 100644
index 0000000..33f4a22
--- /dev/null
+++ b/debian/patches/exclude_test_tyring_to_access_remote_ftpserver.patch
@@ -0,0 +1,29 @@
+Description: Exclude test tyring to access remote ftpserver
+Bug-Debian: https://bugs.debian.org/861496
+Author: Andreas Tille <tille at 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()
diff --git a/debian/patches/htslib-external-config.patch b/debian/patches/htslib-external-config.patch
deleted file mode 100644
index cf4915f..0000000
--- a/debian/patches/htslib-external-config.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: Do not use internal htslib library
-Author: Afif Elghraoui <afif at 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],
diff --git a/debian/patches/no-usage-test-without-tty.patch b/debian/patches/no-usage-test-without-tty.patch
new file mode 100644
index 0000000..1f95b29
--- /dev/null
+++ b/debian/patches/no-usage-test-without-tty.patch
@@ -0,0 +1,19 @@
+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 at 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)
diff --git a/debian/patches/pysam_stdout_linkage.patch b/debian/patches/pysam_stdout_linkage.patch
new file mode 100644
index 0000000..9e9b54e
--- /dev/null
+++ b/debian/patches/pysam_stdout_linkage.patch
@@ -0,0 +1,28 @@
+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 at 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
diff --git a/debian/patches/rpath.patch b/debian/patches/rpath.patch
deleted file mode 100644
index 9d68920..0000000
--- a/debian/patches/rpath.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Description: Disable setting rpath
-Author: Afif Elghraoui <afif at 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)
diff --git a/debian/patches/series b/debian/patches/series
index af88631..0aa298f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,2 @@
-rpath.patch
-htslib-external-config.patch
+pysam_stdout_linkage.patch
+no-usage-test-without-tty.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-pysam.git



More information about the debian-med-commit mailing list