* Disable testsuite.
[dgit import unpatched python-pysam 0.12.0.1+ds-3+rpi1]
--- /dev/null
--- /dev/null
++python-pysam (0.12.0.1+ds-3+rpi1) buster-staging; urgency=medium
++
++ * Disable testsuite.
++
++ -- Peter Michael Green <plugwash@raspbian.org> Thu, 09 Nov 2017 01:20:03 +0000
++
++python-pysam (0.12.0.1+ds-3) unstable; urgency=medium
++
++ * Team upload.
++ * Support DEB_BUILD_OPTIONS=nocheck.
++ * Skip tests on ppc64el to avoid build-dep on bcftools which is currently
++ uninstallable.
++ Hopefully this will help unstuck the current python3 transition.
++
++ -- Mattia Rizzolo <mattia@debian.org> Tue, 24 Oct 2017 18:54:29 +0200
++
++python-pysam (0.12.0.1+ds-2) unstable; urgency=low
++
++ * Update autopkgtest for new test suite driver
++
++ -- Afif Elghraoui <afif@debian.org> Fri, 06 Oct 2017 23:38:45 -0400
++
++python-pysam (0.12.0.1+ds-1) unstable; urgency=medium
++
++ [ Andreas Tille ]
++ * Drop patch applied upstream
++ * Standards-Version: 4.1.0 (no changes needed)
++ * Apply upstream patch to fix test suite
++ * Use pytest instead of nosetest
++
++ [ Afif Elghraoui ]
++ * New upstream version
++ Closes: #871083, #834856
++ * Bump htslib suite minimum versions
++ * Use Build Profiles to mark build-dependencies needed only for tests
++ * Temporarily skip a failing test (reported upstream)
++
++ [ Steffen Moeller ]
++ * created debian/upstream/metadata: references to registries
++
++ -- Afif Elghraoui <afif@debian.org> Sun, 01 Oct 2017 12:30:30 -0400
++
++python-pysam (0.11.2.2+ds-3) unstable; urgency=medium
++
++ * Team upload
++ * Link with -Wl,--as-needed and avoid another Python 2.7
++ compatibility symlink for libchtslib.so
++
++ -- Graham Inggs <ginggs@debian.org> Tue, 01 Aug 2017 14:15:58 +0200
++
++python-pysam (0.11.2.2+ds-2) unstable; urgency=medium
++
++ * Team upload
++ * Mark debian/python-pysam.links executable for dh-exec
++ * Drop exclude_test_tyring_to_access_remote_ftpserver.patch,
++ fixed upstream
++ * Drop pysam_stdout_linkage.patch, not needed since
++ compatibility symlinks were added
++
++ -- Graham Inggs <ginggs@debian.org> Mon, 31 Jul 2017 14:05:22 +0200
++
++python-pysam (0.11.2.2+ds-1) unstable; 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
++ * debhelper 10
++ * Standards-Version: 4.0.0 (no changes needed)
++ * Add some symlinks to run autopkgtests correctly
++
++ -- Andreas Tille <tille@debian.org> Sat, 29 Jul 2017 09:03:05 +0200
++
++python-pysam (0.10.0+ds-2) unstable; urgency=medium
++
++ * d/rules:
++ - Add some files that need to be removed after running tests
++ - Remove other autogenerated files to build twice in a row
++ * Exclude test tyring to access remote ftpserver
++ Closes: #861496
++
++ -- Andreas Tille <tille@debian.org> Thu, 04 May 2017 15:06:21 +0200
++
++python-pysam (0.10.0+ds-1) unstable; urgency=medium
++
++ [ Afif Elghraoui ]
++ * New upstream release
++ * Update patches
++
++ [ Andreas Tille ]
++ * d/rules: Remove redundant get-orig-source target
++ * hardening=+all
++ * Fix lintian overrides
++
++ [ Afif Elghraoui ]
++ * Do not use internal htslib
++
++ -- Afif Elghraoui <afif@debian.org> Thu, 26 Jan 2017 04:36:11 -0800
++
++python-pysam (0.9.1.4+ds-1) unstable; urgency=medium
++
++ * Imported Upstream version 0.9.1.4+ds
++ * Drop patch applied upstream
++ * Drop unused lintian overrides
++ * Fix spelling issues
++
++ -- Afif Elghraoui <afif@debian.org> Sat, 23 Jul 2016 18:47:31 -0700
++
++python-pysam (0.9.1+ds-1) unstable; urgency=medium
++
++ * Imported Upstream version 0.9.1+ds
++ * Force at least matching versions of the samtools suite
++ * Bump Standards-Version to 3.9.8
++ * Globally use C.UTF-8 locale
++ * Update patch for external htslib
++ * Refresh patch
++ * Drop obsolete patches
++ * Fix handling of configuration headers generated at build time
++ * Rely more on pybuild for build-time tests and respect exit code
++ * Fix autopkgtests
++
++ -- Afif Elghraoui <afif@debian.org> Sun, 19 Jun 2016 18:43:53 -0700
++
++python-pysam (0.9.0+ds-1) unstable; urgency=medium
++
++ * Add filenamemangle to d/watch and space out content
++ * Imported Upstream version 0.9.0+ds (Closes: #814765)
++ * Bump htslib and samtools minimum versions
++ * Update policy statndards-version to 3.9.7
++ * Use encrypted protocols for Vcs URLs in d/control
++ * Use readthedocs page as pysam's homepage
++ * Update packaging for external htslib link
++ * Refresh patches
++ * Delete obsolete patch
++
++ -- Afif Elghraoui <afif@debian.org> Wed, 09 Mar 2016 23:43:59 -0800
++
++python-pysam (0.8.4+ds-1) unstable; urgency=medium
++
++ * Add version constraints to build-dependencies.
++ * Drop ds suffix versioning.
++ * Imported Upstream version 0.8.4+ds
++ * Remove patches applied upstream
++ * Refresh existing patches
++ * Refine d/rules
++ * Set Vcs-Browser to point to cgit rather than gitweb
++ * Reduce dependencies in autopktest dependencies
++ * Replace patch for network-dependent tests
++ * Add new lintian overrides
++
++ -- Afif Elghraoui <afif@ghraoui.name> Fri, 13 Nov 2015 22:15:14 -0800
++
++python-pysam (0.8.3+ds1-3) unstable; urgency=medium
++
++ * Backport upstream commit 6efb22b to permit building with Cython 0.23.x
++ (Closes: 800794)
++ * Revise lintian overrides.
++
++ -- Afif Elghraoui <afif@ghraoui.name> Tue, 06 Oct 2015 00:57:19 -0700
++
++python-pysam (0.8.3+ds1-2) unstable; urgency=medium
++
++ [ Afif Elghraoui ]
++ * Improve python3 compatibility for upstream test sources
++ * Refresh older patches
++ * Fix autopkgtests
++ * Fix error in sam_mpileup.patch
++ * Remove unused lintian override
++
++ [ Andreas Tille ]
++ * Remove tests relying on online connection from test suite
++ * For the moment do some dirty tricks in test run script
++ * The automatic nosetest trigger does not work and this it is
++ switched back to manual nosetests invocation
++
++ -- Afif Elghraoui <afif@ghraoui.name> Fri, 24 Jul 2015 10:12:41 +0200
++
++python-pysam (0.8.3+ds1-1) experimental; urgency=medium
++
++ * Team upload.
++
++ [ Jorge Soares ]
++ * New upstream version
++ * provide python3-pysam
++
++ [ Charles Plessy ]
++ * Requires Python 2.7 or higher.
++
++ [ Andreas Tille ]
++ * Link against htslib
++ * d/watch: dversionmangle
++
++ [ Afif Elghraoui ]
++ * New upstream releases (Closes: #763218)
++ * Remove unnecessary test-suite declaration in d/control
++ * Remove nonexistent files from copyright explanations
++ * Allow building of the package when non-ASCII characters are in the path
++ * Add to package long description
++ * Resolve lintian "duplicated-compressed-file"
++ * Make package descriptions unique
++ * Remove extra license definitions from d/copyright
++ * Fix spelling errors in source distribution (forwarded upstream as well)
++ * Add lintian overrides
++ * Exclude bundled htslib convenience-copy
++ * Provide get-orig-source rule
++ * Support building with missing htslib directory
++ * Add dependency on cython for autopkgtests to provide pyximport
++ * Revamp debian/copyright
++
++ -- Afif Elghraoui <afif@ghraoui.name> Thu, 25 Jun 2015 10:44:30 +0200
++
++python-pysam (0.7.7-1) unstable; urgency=medium
++
++ * New upstream releases.
++ * Upstream source code moved to GitHub.
++ * Watch the Python Package Index since there are no relevant tags on GitHub.
++ * Added a git-buildpackage configuration file to mark its usage.
++ * Build-depend samtools (>= 0.1.19); this is needed for the regression tests
++ in Wheezy.
++ * debian/patches/offline-tests.patch: correction from a later release.
++
++ -- Charles Plessy <plessy@debian.org> Sat, 19 Apr 2014 14:17:42 +0900
++
++python-pysam (0.7.5-5) unstable; urgency=medium
++
++ * Add make to autopkgtest dependencies
++ Closes: #741274
++
++ -- Andreas Tille <tille@debian.org> Wed, 19 Mar 2014 13:30:15 +0100
++
++python-pysam (0.7.5-4) unstable; urgency=medium
++
++ * Fix autotest
++ Closes: #741274
++
++ -- Andreas Tille <tille@debian.org> Tue, 11 Mar 2014 20:08:15 +0100
++
++python-pysam (0.7.5-3) unstable; urgency=medium
++
++ * Do not install tests in world writable dir
++ Closes: #739575
++
++ -- Andreas Tille <tille@debian.org> Sat, 01 Mar 2014 23:40:21 +0100
++
++python-pysam (0.7.5-2) unstable; urgency=medium
++
++ * debian/rules: Set PYTHONPATH correctly using dh_python
++ (thanks to Piotr Ożarowski <piotr@debian.org> for the patch)
++ Closes: #739631
++
++ -- Andreas Tille <tille@debian.org> Thu, 20 Feb 2014 19:01:46 +0100
++
++python-pysam (0.7.5-1) unstable; urgency=low
++
++ * Initial release (Closes: #738665)
++
++ -- Andreas Tille <tille@debian.org> Fri, 07 Feb 2014 18:29:40 +0100
--- /dev/null
--- /dev/null
++tests/GRCh38_full_analysis_set_plus_decoy_hla.fa.fai
++tests/pysam_data/ex1.fa.gz
++tests/pysam_data/ex1.fa.gz.gzi
++tests/pysam_data/ex1_csi.bam.csi
--- /dev/null
--- /dev/null
++10
--- /dev/null
--- /dev/null
++Source: python-pysam
++Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
++Uploaders:
++ Charles Plessy <plessy@debian.org>,
++ Andreas Tille <tille@debian.org>,
++ Afif Elghraoui <afif@debian.org>,
++Section: python
++Priority: optional
++Build-Depends:
++ debhelper (>= 10),
++ dh-exec,
++ dh-python,
++ libhts-dev (>= 1.5),
++ zlib1g-dev,
++ python-all-dev,
++ python-setuptools,
++ cython (>= 0.23),
++ python3-all-dev,
++ python3-setuptools,
++ cython3 (>= 0.23),
++ tabix <!nocheck>,
++ samtools (>= 1.5) <!nocheck>,
++ bcftools (>= 1.5) [!ppc64el] <!nocheck>,
++ python-pytest <!nocheck>,
++ python3-pytest <!nocheck>,
++Standards-Version: 4.1.0
++Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/python-pysam.git
++Vcs-Git: https://anonscm.debian.org/git/debian-med/python-pysam.git
++Homepage: http://pysam.readthedocs.org/en/latest
++X-Python-Version: >= 2.7
++X-Python3-Version: >= 3.2
++
++Package: python-pysam
++Architecture: any
++Depends:
++ ${shlibs:Depends},
++ ${misc:Depends},
++ ${python:Depends},
++Description: interface for the SAM/BAM sequence alignment and mapping format (Python 2)
++ Pysam is a Python module for reading and manipulating Samfiles. It's a
++ lightweight wrapper of the samtools C-API. Pysam also includes an interface
++ for tabix.
++ .
++ This package installs the module for Python 2.
++
++Package: python3-pysam
++Architecture: any
++Depends:
++ ${shlibs:Depends},
++ ${misc:Depends},
++ ${python3:Depends},
++Description: interface for the SAM/BAM sequence alignment and mapping format (Python 3)
++ Pysam is a Python module for reading and manipulating Samfiles. It's a
++ lightweight wrapper of the samtools C-API. Pysam also includes an interface
++ for tabix.
++ .
++ This package installs the module for Python 3.
++
++Package: python-pysam-tests
++Architecture: all
++Enhances: python-pysam
++Depends: ${misc:Depends},
++Description: interface for the SAM/BAM sequence alignment and mapping format (test data)
++ Pysam is a Python module for reading and manipulating Samfiles. It's a
++ lightweight wrapper of the samtools C-API. Pysam also includes an interface
++ for tabix.
++ .
++ This package contains the data provided by upstream to run the pysam
++ test suite.
--- /dev/null
--- /dev/null
++Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
++Upstream-Name: pysam
++Upstream-Contact: Andreas Heger <andreas.heger@gmail.com>
++Source: https://github.com/pysam-developers/pysam
++Files-Excluded: htslib/*
++
++Files: *
++Copyright: 2009-2016 Andreas Heger,
++ Tildon Grant Belgrad,
++ Martin Goodson,
++ Kevin Jacobs <jacobs@bionformed.com>
++ 2008-2010 Genome Research Ltd.
++License: MIT
++
++Files: bcftools/*
++Copyright:
++ 2013-2015 Genome Research Ltd.
++ 2010-2011 Broad Institute
++License: MIT
++
++Files: samtools/*
++Copyright: 2009-2012 Broad Institute
++ 2008-2014 Genome Research Ltd.
++License: MIT
++
++Files: samtools/bam_cat.*
++Copyright: 2008-2009, 2011-2013 Genome Research Ltd.
++ 2010 Illumina, Inc.
++License: MIT
++
++Files: samtools/bam_color.*
++Copyright: 2009, 2012 University of California - Los Angeles
++License: MIT
++
++Files: samtools/bam_index.*
++ samtools/bam_mate.*
++Copyright: 2008-2014 Genome Research Ltd.
++ 2010-2011 Broad Institute
++ 2012-2013 Peter Cock, The James Hutton Institute
++License: MIT
++
++Files: samtools/bam_tview.*
++ samtools/bam_tview_curses.*
++ samtools/bam_tview.h
++Copyright: 2008-2014 Genome Research Ltd.
++ 2013 Pierre Lindenbaum <plindenbaum@yahoo.fr>
++License: MIT
++
++Files: samtools/bam_tview_html.*
++Copyright: 2013 Pierre Lindenbaum, Institut du Thorax, INSERM U1087, Université de Nantes
++License: MIT
++
++Files: samtools/kprobaln.c samtools/kprobaln.c.pysam.c samtools/kprobaln.h
++Copyright: 2003-2006, 2008-2010, by Heng Li <lh3lh3@live.co.uk>
++License: MIT
++
++Files: samtools/misc/ace2sam.*
++Copyright: 2011 Heng Li
++License: MIT
++
++Files: samtools/padding.*
++Copyright: 2011-2012 Broad Institute
++ 2014 Genome Research Ltd.
++ 2012-2013 Peter Cock, The James Hutton Institute
++License: MIT
++
++Files: samtools/win32/zconf.h samtools/win32/zlib.h
++Copyright: 1995-2005 Jean-loup Gailly <jloup@gzip.org> and Mark Adler <madler@alumni.caltech.edu>
++License: BSDlike2
++ This software is provided 'as-is', without any express or implied
++ warranty. In no event will the authors be held liable for any damages
++ arising from the use of this software.
++ .
++ Permission is granted to anyone to use this software for any purpose,
++ including commercial applications, and to alter it and redistribute it
++ freely, subject to the following restrictions:
++ .
++ 1. The origin of this software must not be misrepresented; you must not
++ claim that you wrote the original software. If you use this software
++ in a product, an acknowledgment in the product documentation would be
++ appreciated but is not required.
++ 2. Altered source versions must be plainly marked as such, and must not be
++ misrepresented as being the original software.
++ 3. This notice may not be removed or altered from any source distribution.
++Comment: These files are not used and could be stripped from the source
++
++Files: samtools/win32/xcurses.h
++Copyright: 2008 wmcbrine
++License: public-domain
++Comment: These files are not used and could be stripped from the source
++
++Files: win32/stdint.h
++Copyright: 2005-2007 Paul Hsieh
++License: BSD-3-clause
++
++Files: win32/getopt.*
++Copyright: 1987-2001 Free Software Foundation, Inc.
++License: LGPL-2.1+
++
++Files: debian/*
++Copyright:
++ 2015-2016 Afif Elghraoui <afif@debian.org>
++ 2015 Jorge Soares <j.s.soares@gmail.com>
++ 2014-2015 Charles Plessy <plessy@debian.org>
++ 2014-2015 Andreas Tille <tille@debian.org>
++License: MIT
++
++License: BSD-3-clause
++ Redistribution and use in source and binary forms, with or without
++ modification, are permitted provided that the following conditions
++ are met:
++ 1. Redistributions of source code must retain the above copyright
++ notice, this list of conditions and the following disclaimer.
++ 2. Redistributions in binary form must reproduce the above copyright
++ notice, this list of conditions and the following disclaimer in the
++ documentation and/or other materials provided with the distribution.
++ 3. Neither the name of the University nor the names of its contributors
++ may be used to endorse or promote products derived from this software
++ without specific prior written permission.
++ .
++ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR
++ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
++ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
++ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
++ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
++ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
++ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
++ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++
++License: MIT
++ Permission is hereby granted, free of charge, to any person obtaining a copy
++ of this software and associated documentation files (the "Software"), to deal
++ in the Software without restriction, including without limitation the rights
++ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ copies of the Software, and to permit persons to whom the Software is
++ furnished to do so, subject to the following conditions:
++ .
++ The above copyright notice and this permission notice shall be included in
++ all copies or substantial portions of the Software.
++ .
++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ THE SOFTWARE.
++
++License: public-domain
++ No copyright is claimed.
++ This code is in the public domain; do with it what you wish.
++
++License: LGPL-2.1+
++ This package is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++ .
++ This package is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++ .
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++ .
++ On Debian systems, the complete text of the GNU Lesser General
++ Public License can be found in "/usr/share/common-licenses/LGPL-2.1".
--- /dev/null
--- /dev/null
++# This source package is managed with git-buildpackage and pristine-tar.
++
++[DEFAULT]
++# use pristine-tar:
++pristine-tar = True
--- /dev/null
--- /dev/null
++From: Andreas Heger <andreas.heger@gmail.com>
++Date: Mon, 18 Sep 2017 11:19:28 +0100
++Bug-Debian: https://bugs.debian.org/871083
++Subject: execute linking tests only when explicitely
++ requested via PYSAM_LINKING_TESTS env var. Keep on travis. Fixes #534
++
++---
++ .travis.yml | 2 ++
++ tests/TestUtils.py | 1 +
++ tests/linking_test.py | 10 ++++++++++
++ 3 files changed, 13 insertions(+)
++
++--- a/.travis.yml
+++++ b/.travis.yml
++@@ -11,6 +11,8 @@ env:
++ - CONDA_PY=3.4
++ - CONDA_PY=3.5
++ - CONDA_PY=3.6
+++ global:
+++ - PYSAM_LINKING_TEST=1
++
++ addons:
++ apt:
++--- a/tests/TestUtils.py
+++++ b/tests/TestUtils.py
++@@ -23,6 +23,7 @@ LINKDIR = os.path.abspath(os.path.join(o
++
++ IS_PYTHON3 = sys.version_info[0] >= 3
++
+++
++ if IS_PYTHON3:
++ from itertools import zip_longest
++ from urllib.request import urlopen
++--- a/tests/linking_test.py
+++++ b/tests/linking_test.py
++@@ -31,6 +31,9 @@ def check_tests_pass(statement):
++ return True
++
++
+++@unittest.skipUnless(
+++ os.environ.get("PYSAM_LINKING_TESTS", None),
+++ "enable linking tests by setting PYSAM_LINKING_TESTS environment variable")
++ class TestLinking(unittest.TestCase):
++
++ package_name = "link_with_rpath"
++@@ -43,6 +46,10 @@ class TestLinking(unittest.TestCase):
++ "cd {} && rm -rf build && python setup.py install".format(self.workdir),
++ shell=True)
++
+++
+++@unittest.skipUnless(
+++ os.environ.get("PYSAM_LINKING_TESTS", None),
+++ "enable linking tests by setting PYSAM_LINKING_TESTS environment variable")
++ class TestLinkWithRpath(TestLinking):
++
++ package_name = "link_with_rpath"
++@@ -52,6 +59,9 @@ class TestLinkWithRpath(TestLinking):
++ "cd {} && python test_module.py".format(os.path.join(self.workdir, "tests"))))
++
++
+++@unittest.skipUnless(
+++ os.environ.get("PYSAM_LINKING_TESTS", None),
+++ "enable linking tests by setting PYSAM_LINKING_TESTS environment variable")
++ class TestLinkWithoutRpath(TestLinking):
++
++ package_name = "link_without_rpath"
--- /dev/null
--- /dev/null
++From: Andreas Heger <andreas.heger@gmail.com>
++Date: Mon, 18 Sep 2017 16:48:21 +0100
++Bug-Debian: https://bugs.debian.org/871083
++Subject: rename helper function to prevent it from being picked
++ up by nose, fixes #541
++
++---
++ tests/linking_test.py | 6 +++---
++ 1 file changed, 3 insertions(+), 3 deletions(-)
++
++--- a/tests/linking_test.py
+++++ b/tests/linking_test.py
++@@ -20,7 +20,7 @@ def check_import(statement):
++ raise
++
++
++-def check_tests_pass(statement):
+++def check_pass(statement):
++ try:
++ output = subprocess.check_output(
++ statement, stderr=subprocess.STDOUT, shell=True)
++@@ -55,7 +55,7 @@ class TestLinkWithRpath(TestLinking):
++ package_name = "link_with_rpath"
++
++ def test_package_tests_pass(self):
++- self.assertTrue(check_tests_pass(
+++ self.assertTrue(check_pass(
++ "cd {} && python test_module.py".format(os.path.join(self.workdir, "tests"))))
++
++
++@@ -79,7 +79,7 @@ class TestLinkWithoutRpath(TestLinking):
++ pysam_libdirs, pysam_libs = zip(*[os.path.split(x) for x in pysam_libraries])
++ pysam_libdir = pysam_libdirs[0]
++
++- self.assertTrue(check_tests_pass(
+++ self.assertTrue(check_pass(
++ "export LD_LIBRARY_PATH={}:$PATH && cd {} && python test_module.py".format(
++ pysam_libdir,
++ os.path.join(self.workdir, "tests"))))
--- /dev/null
--- /dev/null
++execute-linking-tests-only-when-explicitely-reque.patch
++rename-helper-function-to-prevent-it-from-being-picked-up-by-nose.patch
++xfail.patch
--- /dev/null
--- /dev/null
++Description: temporarily skip failing test
++ See https://github.com/pysam-developers/pysam/issues/542
++Author: Afif Elghraoui <afif@debian.org>
++Forwarded: not-needed
++Last-Update: 2017-10-01
++--- python-pysam.orig/tests/AlignmentFile_test.py
+++++ python-pysam/tests/AlignmentFile_test.py
++@@ -521,6 +521,7 @@
++ "tmp_ex2.bam",
++ "rb", "wb")
++
+++ @unittest.skip
++ def testCRAM2CRAM(self):
++ self.checkEcho("ex2.cram",
++ "ex2.cram",
--- /dev/null
--- /dev/null
++Pysam for Debian
++================
++
++To verify whether your python-pysam and python3-pysam modules are working
++correctly you can run the test suite manually by running the scripts
++run-nose-tests and run-nose3-tests in this directory.
++
++ -- Jorge Soares <j.s.soares@gmail.com> Fri, 28 Nov 2014 14:29:40 +0100
--- /dev/null
--- /dev/null
++debian/tests/run-nose-tests
++debian/tests/run-nose3-tests
--- /dev/null
--- /dev/null
++tests usr/share/doc/python-pysam
--- /dev/null
--- /dev/null
++# These files are intentionally empty to be used for testing
++zero-byte-file-in-doc-directory usr/share/doc/python-pysam/tests/cbcf_data/example_empty.vcf
++zero-byte-file-in-doc-directory usr/share/doc/python-pysam/tests/tabix_data/empty.bed.gz
++# The duplicate is used for testing and needs to be there
++duplicated-compressed-file usr/share/doc/python-pysam/tests/pysam_data/ex1.fa.gz
--- /dev/null
--- /dev/null
++#!/usr/bin/dh-exec
++/usr/lib/python2.7/dist-packages/pysam/libcsamtools.${DEB_HOST_GNU_TYPE}.so /usr/lib/python2.7/dist-packages/pysam/libcsamtools.so
++/usr/lib/python2.7/dist-packages/pysam/libcbcftools.${DEB_HOST_GNU_TYPE}.so /usr/lib/python2.7/dist-packages/pysam/libcbcftools.so
--- /dev/null
--- /dev/null
++# These are apparently false-positives
++# Inspection of the build logs shows that these are indeed compiled with
++# -D_FORTIFY_SOURCE=2
++hardening-no-fortify-functions usr/lib/python2.7/dist-packages/pysam/lib*.so
--- /dev/null
--- /dev/null
++# These are apparently false-positives
++# Inspection of the build logs shows that these are indeed compiled with
++# -D_FORTIFY_SOURCE=2
++hardening-no-fortify-functions usr/lib/python3/dist-packages/pysam/lib*.so
--- /dev/null
--- /dev/null
++#!/usr/bin/make -f
++
++include /usr/share/dpkg/default.mk
++
++export PYBUILD_NAME=pysam
++export LC_ALL = C.UTF-8
++
++export DEB_BUILD_MAINT_OPTIONS = hardening=+all
++export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
++
++TESTPKG := $(DEB_SOURCE)-tests
++
++export HTSLIB_MODE=external
++HTSLIBDIR := /usr/lib/$(DEB_HOST_MULTIARCH)
++export HTSLIB_LIBRARY_DIR=$(HTSLIBDIR)
++export HTSLIB_INCLUDE_DIR=/usr/include
++
++clean: clean-tests
++%:
++ dh $@ --with python2,python3 --buildsystem=pybuild
++
++override_dh_install: clean-tests
++ dh_install -Xtest.gtf.gz
++
++ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
++#ifneq ($(DEB_HOST_ARCH),ppc64el)
++#override_dh_auto_test: pysam_data.all cbcf_data.all
++# dh_auto_test
++#else
++override_dh_auto_test:
++#endif
++else
++override_dh_auto_test:
++endif
++
++override_dh_auto_clean:
++ dh_auto_clean
++ $(RM) \
++ pysam/config.py \
++ pysam/config.h \
++ pysam/lib*.c \
++ samtools/config.h \
++ bcftools/config.h
++ rm -rf pysam.egg-info
++
++.PHONY: pysam_data.% cbcf_data.%
++cbcf_data.%:
++ cd tests/$(basename $@) && $(MAKE) $*
++pysam_data.%:
++ cd tests/$(basename $@) && $(MAKE) $*
++
++.PHONY: clean-tests
++clean-tests: pysam_data.clean cbcf_data.clean
++ find . -name "*.pyc" -delete
++ find . -name "*.pyxbldc" -delete
++ find . -name "tmp_*" -delete
++ find . -name "*.bai*" -delete
++ find . -name "*.cram*" -delete
++ find . -name "*.bam" -delete
++ rm -rf tests/pysam_test_work \
++ tests/example_htslib.gtf.gz.tbi \
++ tests/log.txt \
++ tests/test.bam \
++ tests/_compile_test.c \
++ tests/pysam_ex2.sam \
++ tests/__pycache__ \
++ pysam/calignmentfile.c \
++ pysam/cbcf.c \
++ tests/GRCh38_full_analysis_set_plus_decoy_hla.fa.fai \
++ tests/pysam_data/ex1.fa.gz \
++ tests/pysam_data/ex1.fa.gz.gzi \
++ tests/pysam_data/ex1_csi.bam.csi
++
--- /dev/null
--- /dev/null
++3.0 (quilt)
--- /dev/null
--- /dev/null
++Test-Command: make -C tests/pysam_data && make -C tests/cbcf_data && pytest
++Depends:
++ @builddeps@,
++ python-pysam,
++Restrictions: allow-stderr, rw-build-tree
++
++Test-Command: make -C tests/pysam_data && make -C tests/cbcf_data && pytest-3
++Depends:
++ @builddeps@,
++ python3-pysam,
++Restrictions: allow-stderr, rw-build-tree
--- /dev/null
--- /dev/null
++#!/bin/sh -e
++
++if [ "$ADTTMP" = "" ] ; then
++ ADTTMP=`mktemp -d /tmp/python-pysam-test.XXXXXX`
++fi
++cp -ra /usr/share/doc/python-pysam/data/* $ADTTMP
++
++# FIXME!!
++# That's a pretty strange hack but without it the dynamic libraries are not found
++# Need to be tracked down before uploading
++cd /usr/lib/python2.7/dist-packages/pysam
++gnutype=`dpkg-architecture -qDEB_TARGET_GNU_TYPE`
++for so in *.${gnutype}.so ; do sudo ln -sf $so `basename $so .${gnutype}.so`.so ; done
++
++cd $ADTTMP
++find . -name "*.gz" -exec gunzip -f \{\} \;
++
++nosetests --nocapture -v
++cd
++# rm -rf $ADTTMP
++
--- /dev/null
--- /dev/null
++#!/bin/sh -e
++
++if [ "$ADTTMP" = "" ] ; then
++ ADTTMP=`mktemp -d /tmp/python3-pysam-test.XXXXXX`
++fi
++cd $ADTTMP
++cp -ra /usr/share/doc/python-pysam/tests/* $ADTTMP
++nosetests3 --nocapture
++cd
++rm -rf $ADTTMP
--- /dev/null
--- /dev/null
++Registry:
++ - Name: OMICtools
++ Entry: OMICS_19073
++ - Name: RRID
++ Entry: NA
++ - Name: bio.tools
++ Entry: pysam
--- /dev/null
--- /dev/null
++version=3
++
++opts="repacksuffix=+ds,dversionmangle=s/\+ds//g,filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%python-pysam-$1.tar.gz%" \
++ https://github.com/pysam-developers/pysam/tags \
++ (?:.*/)?v?(\d[\d\.]*)\.tar\.gz