From: Graham Inggs Date: Mon, 19 Feb 2018 10:11:17 +0000 (+0000) Subject: python-pysam (0.14+ds-2) unstable; urgency=medium X-Git-Tag: archive/raspbian/0.14+ds-2+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bd8c5a1fceae885edaf1abe92ce8abc010bd292e;p=python-pysam.git python-pysam (0.14+ds-2) unstable; urgency=medium * Team upload * Add Python 2.7 compatibility symlink for libchtslib.so (Closes: #890748) * Update Vcs-* URIs for move to salsa.debian.org * Remove trailing whitespace from debian/changelog [dgit import unpatched python-pysam 0.14+ds-2] --- bd8c5a1fceae885edaf1abe92ce8abc010bd292e diff --cc debian/changelog index 0000000,0000000..99de75a new file mode 100644 --- /dev/null +++ b/debian/changelog @@@ -1,0 -1,0 +1,301 @@@ ++python-pysam (0.14+ds-2) unstable; urgency=medium ++ ++ * Team upload ++ * Add Python 2.7 compatibility symlink for libchtslib.so (Closes: #890748) ++ * Update Vcs-* URIs for move to salsa.debian.org ++ * Remove trailing whitespace from debian/changelog ++ ++ -- Graham Inggs Mon, 19 Feb 2018 10:11:17 +0000 ++ ++python-pysam (0.14+ds-1) unstable; urgency=medium ++ ++ * New upstream version ++ * d/rules: Exclude tests using http access ++ * Bump versioned dependencies to samtools and related from 1.6 to 1.7 ++ * cme fix dpkg-control ++ * debhelper 11 ++ * do not remove samtools/tmp_file.h in clean target ++ * do not depend from non-existing data file in make test target ++ * Update d/copyright ++ * Update lintian overrides ++ ++ -- Andreas Tille Sat, 17 Feb 2018 21:45:07 +0100 ++ ++python-pysam (0.13.0+ds-1) unstable; urgency=medium ++ ++ * New upstream version ++ * Bump versioned Build-Depends on libhts-dev, samtools and bcftools to 1.6 ++ * Exclude tests accessing remote http sites ++ * Lintian-override for false positive ++ * Remove unused paragraphs from d/copyright ++ ++ -- Andreas Tille Thu, 14 Dec 2017 16:36:43 +0100 ++ ++python-pysam (0.12.0.1+ds-4) unstable; urgency=medium ++ ++ * Team upload. ++ * Revert "Skip tests on ppc64el to avoid build-dep on bcftools currently ++ uninstallable". It seems to be installable now, and anyway now that the ++ python3 transition is done we should fix it properly anyway. ++ * d/control: ++ + Bump the libhts-dev buil-dep to 1.5-3, to make sure we gain appropriate ++ versioned symbols and therefore an appropriate versioned dependency on ++ libhts2. Closes: #879867 ++ + Bump Standards-Version to 4.1.1. ++ ++ -- Mattia Rizzolo Fri, 10 Nov 2017 12:56:10 +0100 ++ ++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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 Wed, 19 Mar 2014 13:30:15 +0100 ++ ++python-pysam (0.7.5-4) unstable; urgency=medium ++ ++ * Fix autotest ++ Closes: #741274 ++ ++ -- Andreas Tille 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 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 for the patch) ++ Closes: #739631 ++ ++ -- Andreas Tille Thu, 20 Feb 2014 19:01:46 +0100 ++ ++python-pysam (0.7.5-1) unstable; urgency=low ++ ++ * Initial release (Closes: #738665) ++ ++ -- Andreas Tille Fri, 07 Feb 2014 18:29:40 +0100 diff --cc debian/clean index 0000000,0000000..6987d15 new file mode 100644 --- /dev/null +++ b/debian/clean @@@ -1,0 -1,0 +1,4 @@@ ++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 diff --cc debian/compat index 0000000,0000000..b4de394 new file mode 100644 --- /dev/null +++ b/debian/compat @@@ -1,0 -1,0 +1,1 @@@ ++11 diff --cc debian/control index 0000000,0000000..3c1900b new file mode 100644 --- /dev/null +++ b/debian/control @@@ -1,0 -1,0 +1,65 @@@ ++Source: python-pysam ++Maintainer: Debian Med Packaging Team ++Uploaders: Charles Plessy , ++ Andreas Tille , ++ Afif Elghraoui ++Section: python ++Priority: optional ++Build-Depends: debhelper (>= 11~), ++ dh-exec, ++ dh-python, ++ libhts-dev (>= 1.7), ++ zlib1g-dev, ++ python-all-dev, ++ python-setuptools, ++ cython (>= 0.23), ++ python3-all-dev, ++ python3-setuptools, ++ cython3 (>= 0.23), ++ tabix , ++ samtools (>= 1.7) , ++ bcftools (>= 1.7) , ++ python-pytest , ++ python3-pytest ++Standards-Version: 4.1.3 ++Vcs-Browser: https://salsa.debian.org/med-team/python-pysam ++Vcs-Git: https://salsa.debian.org/med-team/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 ++Depends: ${misc:Depends} ++Enhances: python-pysam ++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. diff --cc debian/copyright index 0000000,0000000..39dcc02 new file mode 100644 --- /dev/null +++ b/debian/copyright @@@ -1,0 -1,0 +1,156 @@@ ++Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ ++Upstream-Name: pysam ++Upstream-Contact: Andreas Heger ++Source: https://github.com/pysam-developers/pysam ++Files-Excluded: htslib/* ++ ++Files: * ++Copyright: 2009-2018 Andreas Heger, ++ Tildon Grant Belgrad, ++ Martin Goodson, ++ Kevin Jacobs ++ 2008-2010 Genome Research Ltd. ++License: MIT ++ ++Files: bcftools/* ++Copyright: ++ 2013-2018 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/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 and Mark Adler ++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 ++ 2015 Jorge Soares ++ 2014-2015 Charles Plessy ++ 2014-2018 Andreas Tille ++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 . ++ . ++ On Debian systems, the complete text of the GNU Lesser General ++ Public License can be found in "/usr/share/common-licenses/LGPL-2.1". diff --cc debian/gbp.conf index 0000000,0000000..bf424bb new file mode 100644 --- /dev/null +++ b/debian/gbp.conf @@@ -1,0 -1,0 +1,5 @@@ ++# This source package is managed with git-buildpackage and pristine-tar. ++ ++[DEFAULT] ++# use pristine-tar: ++pristine-tar = True diff --cc debian/patches/exclude_tests_accessing_remote_http.patch index 0000000,0000000..6f5fa65 new file mode 100644 --- /dev/null +++ b/debian/patches/exclude_tests_accessing_remote_http.patch @@@ -1,0 -1,0 +1,225 @@@ ++Author: Andreas Tille ++Last-Update: Wed, 13 Dec 2017 13:03:50 +0100 ++Description: Exclude tests trying to access remote http sites and thus need ++ to fail in a chroot without network access. ++ . ++ Remark: Any more elegant method than dumb removal to exclude the tests would ++ be welcome. ++ ++--- a/save/pysam_test2.6.py +++++ b/save/pysam_test2.6.py ++@@ -1284,61 +1284,6 @@ class TestDoubleFetch(unittest.TestCase) ++ samfile1.fetch( until_eof = True )): ++ self.assertEqual( a.compare( b), 0 ) ++ ++-class TestRemoteFileFTP(unittest.TestCase): ++- '''test remote access. ++- ++- ''' ++- ++- # Need to find an ftp server without password on standard ++- # port. ++- ++- url = "ftp://ftp.sanger.ac.uk/pub/rd/humanSequences/CV.bam" ++- region = "1:1-1000" ++- ++- def testFTPView( self ): ++- return ++- result = pysam.view( self.url, self.region ) ++- self.assertEqual( len(result), 36 ) ++- ++- def testFTPFetch( self ): ++- return ++- samfile = pysam.Samfile(self.url, "rb") ++- result = list(samfile.fetch( region = self.region )) ++- self.assertEqual( len(result), 36 ) ++- ++-class TestRemoteFileHTTP( unittest.TestCase): ++- ++- url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/ex1.bam" ++- region = "chr1:1-1000" ++- local = "ex1.bam" ++- ++- def testView( self ): ++- samfile_local = pysam.Samfile(self.local, "rb") ++- ref = list(samfile_local.fetch( region = self.region )) ++- ++- result = pysam.view( self.url, self.region ) ++- self.assertEqual( len(result), len(ref) ) ++- ++- def testFetch( self ): ++- samfile = pysam.Samfile(self.url, "rb") ++- result = list(samfile.fetch( region = self.region )) ++- samfile_local = pysam.Samfile(self.local, "rb") ++- ref = list(samfile_local.fetch( region = self.region )) ++- ++- self.assertEqual( len(ref), len(result) ) ++- for x, y in zip(result, ref): ++- self.assertEqual( x.compare( y ), 0 ) ++- ++- def testFetchAll( self ): ++- samfile = pysam.Samfile(self.url, "rb") ++- result = list(samfile.fetch()) ++- samfile_local = pysam.Samfile(self.local, "rb") ++- ref = list(samfile_local.fetch() ) ++- ++- self.assertEqual( len(ref), len(result) ) ++- for x, y in zip(result, ref): ++- self.assertEqual( x.compare( y ), 0 ) ++- ++ class TestLargeOptValues( unittest.TestCase ): ++ ++ ints = ( 65536, 214748, 2147484, 2147483647 ) ++--- a/tests/AlignmentFile_test.py +++++ b/tests/AlignmentFile_test.py ++@@ -1559,81 +1559,6 @@ class TestDoubleFetchCRAMWithReference(T ++ reference_filename = os.path.join(BAM_DATADIR, 'ex1.fa') ++ ++ ++-class TestRemoteFileFTP(unittest.TestCase): ++- ++- '''test remote access. ++- ++- ''' ++- ++- # Need to find an ftp server without password on standard ++- # port. ++- ++- url = "ftp://ftp.sanger.ac.uk/pub/rd/humanSequences/CV.bam" ++- region = "1:1-1000" ++- ++- def testFTPView(self): ++- return ++- if not checkURL(self.url): ++- return ++- ++- result = pysam.samtools.view(self.url, self.region) ++- self.assertEqual(len(result), 36) ++- ++- def testFTPFetch(self): ++- return ++- if not checkURL(self.url): ++- return ++- ++- samfile = pysam.AlignmentFile(self.url, "rb") ++- result = list(samfile.fetch(region=self.region)) ++- self.assertEqual(len(result), 36) ++- ++- ++-class TestRemoteFileHTTP(unittest.TestCase): ++- ++- url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/ex1.bam" ++- region = "chr1:1-1000" ++- local = os.path.join(BAM_DATADIR, "ex1.bam") ++- ++- def testView(self): ++- if not checkURL(self.url): ++- return ++- ++- samfile_local = pysam.AlignmentFile(self.local, "rb") ++- ref = list(samfile_local.fetch(region=self.region)) ++- ++- result = pysam.samtools.view(self.url, self.region) ++- self.assertEqual(len(result.splitlines()), len(ref)) ++- ++- def testFetch(self): ++- if not checkURL(self.url): ++- return ++- ++- with pysam.AlignmentFile(self.url, "rb") as samfile: ++- result = list(samfile.fetch(region=self.region)) ++- ++- with pysam.AlignmentFile(self.local, "rb") as samfile_local: ++- ref = list(samfile_local.fetch(region=self.region)) ++- ++- self.assertEqual(len(ref), len(result)) ++- for x, y in zip(result, ref): ++- self.assertEqual(x.compare(y), 0) ++- ++- def testFetchAll(self): ++- if not checkURL(self.url): ++- return ++- ++- with pysam.AlignmentFile(self.url, "rb") as samfile: ++- result = list(samfile.fetch()) ++- ++- with pysam.AlignmentFile(self.local, "rb") as samfile_local: ++- ref = list(samfile_local.fetch()) ++- ++- self.assertEqual(len(ref), len(result)) ++- for x, y in zip(result, ref): ++- self.assertEqual(x.compare(y), 0) ++- ++- ++ class TestLargeOptValues(unittest.TestCase): ++ ++ ints = (65536, 214748, 2147484, 2147483647) ++--- a/tests/tabix_test.py +++++ b/tests/tabix_test.py ++@@ -1039,66 +1039,6 @@ for vcf_file in vcf_files: ++ globals()[n] = type(n, (TestVCFFromVariantFile,), dict(filename=vcf_file,)) ++ ++ ++-class TestRemoteFileHTTP(unittest.TestCase): ++- ++- url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example.gtf.gz" ++- region = "chr1:1-1000" ++- local = os.path.join(TABIX_DATADIR, "example.gtf.gz") ++- ++- def setUp(self): ++- if not pysam.config.HAVE_LIBCURL or not checkURL(self.url): ++- self.remote_file = None ++- else: ++- self.remote_file = pysam.TabixFile(self.url, "r") ++- ++- self.local_file = pysam.TabixFile(self.local, "r") ++- ++- def tearDown(self): ++- if self.remote_file is None: ++- return ++- ++- self.remote_file.close() ++- self.local_file.close() ++- ++- def testFetchAll(self): ++- if self.remote_file is None: ++- return ++- ++- remote_result = list(self.remote_file.fetch()) ++- local_result = list(self.local_file.fetch()) ++- ++- self.assertEqual(len(remote_result), len(local_result)) ++- for x, y in zip(remote_result, local_result): ++- self.assertEqual(x, y) ++- ++- def testHeader(self): ++- if self.remote_file is None: ++- return ++- ++- self.assertEqual(list(self.local_file.header), []) ++- ++- ++-class TestRemoteFileHTTPWithHeader(TestRemoteFileHTTP): ++- ++- url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example_comments.gtf.gz" ++- region = "chr1:1-1000" ++- local = os.path.join(TABIX_DATADIR, "example_comments.gtf.gz") ++- ++- def setUp(self): ++- if not pysam.config.HAVE_LIBCURL or not checkURL(self.url): ++- self.remote_file = None ++- else: ++- self.remote_file = pysam.TabixFile(self.url, "r") ++- self.local_file = pysam.TabixFile(self.local, "r") ++- ++- def testHeader(self): ++- if self.remote_file is None: ++- return ++- ++- self.assertEqual(list(self.local_file.header), ["# comment at start"]) ++- self.assertEqual(list(self.local_file.header), self.remote_file.header) ++- ++- ++ class TestIndexArgument(unittest.TestCase): ++ ++ filename_src = os.path.join(TABIX_DATADIR, "example.vcf.gz") diff --cc debian/patches/execute-linking-tests-only-when-explicitely-reque.patch index 0000000,0000000..9e12348 new file mode 100644 --- /dev/null +++ b/debian/patches/execute-linking-tests-only-when-explicitely-reque.patch @@@ -1,0 -1,0 +1,23 @@@ ++From: Andreas Heger ++Date: Mon, 18 Sep 2017 11:19:28 +0100 ++Bug-Debian: https://bugs.debian.org/871083 ++Subject: execute linking tests only when explicitly ++ 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,8 +11,6 @@ env: ++ - CONDA_PY=3.4 ++ - CONDA_PY=3.5 ++ - CONDA_PY=3.6 ++- global: ++- - PYSAM_LINKING_TEST=1 ++ ++ addons: ++ apt: diff --cc debian/patches/series index 0000000,0000000..97110d9 new file mode 100644 --- /dev/null +++ b/debian/patches/series @@@ -1,0 -1,0 +1,4 @@@ ++execute-linking-tests-only-when-explicitely-reque.patch ++xfail.patch ++exclude_tests_accessing_remote_http.patch ++skip_test_needing_missing_data.patch diff --cc debian/patches/skip_test_needing_missing_data.patch index 0000000,0000000..689f5ff new file mode 100644 --- /dev/null +++ b/debian/patches/skip_test_needing_missing_data.patch @@@ -1,0 -1,0 +1,33 @@@ ++Description: do not depend from non-existing data file in make test target ++ (There is no such file example_reverse_complement.bam) ++Author: Andreas Tille ++Last-Update: Sat, 17 Feb 2018 15:24:34 +0100 ++Forwarded: https://github.com/pysam-developers/pysam/issues/626 ++ ++--- a/tests/pysam_data/Makefile +++++ b/tests/pysam_data/Makefile ++@@ -20,8 +20,7 @@ all: ex1.pileup.gz \ ++ explicit_index.bam explicit_index.cram \ ++ faidx_empty_seq.fq.gz \ ++ ex1.fa.gz ex1.fa.gz.csi \ ++- ex1_csi.bam \ ++- example_reverse_complement.bam +++ ex1_csi.bam ++ ++ # ex2.sam - as ex1.sam, but with header ++ ex2.sam.gz: ex1.bam ex1.bam.bai ++--- a/tests/AlignmentFile_test.py +++++ b/tests/AlignmentFile_test.py ++@@ -1361,12 +1361,7 @@ class TestEmptyHeader(unittest.TestCase) ++ 'example_empty_header.bam')) ++ self.assertEqual(s.header.to_dict(), {'SQ': [{'LN': 1000, 'SN': 'chr1'}]}) ++ ++- def test_bam_without_seq_in_header(self): ++- s = pysam.AlignmentFile(os.path.join(BAM_DATADIR, "example_no_seq_in_header.bam")) ++- self.assertTrue("SQ" in s.header.to_dict()) ++- self.assertTrue("@SQ" in str(s.header)) ++ ++- ++ class TestHeaderWithProgramOptions(unittest.TestCase): ++ ++ '''see issue 39.''' diff --cc debian/patches/xfail.patch index 0000000,0000000..40fb7b9 new file mode 100644 --- /dev/null +++ b/debian/patches/xfail.patch @@@ -1,0 -1,0 +1,15 @@@ ++Description: temporarily skip failing test ++ See https://github.com/pysam-developers/pysam/issues/542 ++Author: Afif Elghraoui ++Forwarded: not-needed ++Last-Update: 2017-10-01 ++--- a/tests/AlignmentFile_test.py +++++ b/tests/AlignmentFile_test.py ++@@ -474,6 +474,7 @@ class TestIO(unittest.TestCase): ++ "tmp_ex2.bam", ++ "rb", "wb") ++ +++ @unittest.skip ++ def testCRAM2CRAM(self): ++ # in some systems different reference sequence paths might be ++ # embedded in the CRAM files which will result in different headers diff --cc debian/python-pysam-tests.README.Debian index 0000000,0000000..0c7ed43 new file mode 100644 --- /dev/null +++ b/debian/python-pysam-tests.README.Debian @@@ -1,0 -1,0 +1,8 @@@ ++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 Fri, 28 Nov 2014 14:29:40 +0100 diff --cc debian/python-pysam-tests.docs index 0000000,0000000..8e41b76 new file mode 100644 --- /dev/null +++ b/debian/python-pysam-tests.docs @@@ -1,0 -1,0 +1,2 @@@ ++debian/tests/run-nose-tests ++debian/tests/run-nose3-tests diff --cc debian/python-pysam-tests.install index 0000000,0000000..a99a578 new file mode 100644 --- /dev/null +++ b/debian/python-pysam-tests.install @@@ -1,0 -1,0 +1,1 @@@ ++tests usr/share/doc/python-pysam diff --cc debian/python-pysam-tests.lintian-overrides index 0000000,0000000..1dfb2c6 new file mode 100644 --- /dev/null +++ b/debian/python-pysam-tests.lintian-overrides @@@ -1,0 -1,0 +1,5 @@@ ++# 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/tabix_data/example.bed.gz diff --cc debian/python-pysam.links index 0000000,0000000..8cc3b2c new file mode 100755 --- /dev/null +++ b/debian/python-pysam.links @@@ -1,0 -1,0 +1,4 @@@ ++#!/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 ++/usr/lib/python2.7/dist-packages/pysam/libchtslib.${DEB_HOST_GNU_TYPE}.so /usr/lib/python2.7/dist-packages/pysam/libchtslib.so diff --cc debian/python-pysam.lintian-overrides index 0000000,0000000..785680d new file mode 100644 --- /dev/null +++ b/debian/python-pysam.lintian-overrides @@@ -1,0 -1,0 +1,4 @@@ ++# 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 diff --cc debian/python3-pysam.lintian-overrides index 0000000,0000000..288316d new file mode 100644 --- /dev/null +++ b/debian/python3-pysam.lintian-overrides @@@ -1,0 -1,0 +1,4 @@@ ++# 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 diff --cc debian/rules index 0000000,0000000..1d9410d new file mode 100755 --- /dev/null +++ b/debian/rules @@@ -1,0 -1,0 +1,73 @@@ ++#!/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 ++ ++# unfortunately this does not work - any hint to fix this would be really welcome ++#export PYBUILD_TEST_ARGS_python2=-k-XTestRemoteFileHTTP -k-XTestRemoteFileHTTPWithHeader ++#export PYBUILD_TEST_ARGS_python3=-k-XTestRemoteFileHTTP -k-XTestRemoteFileHTTPWithHeader ++ ++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))) ++override_dh_auto_test: pysam_data.all cbcf_data.all ++ dh_auto_test ++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 # This deletes samtools/tmp_file.* which is needed to build successfully ++ 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 ++ diff --cc debian/source/format index 0000000,0000000..163aaf8 new file mode 100644 --- /dev/null +++ b/debian/source/format @@@ -1,0 -1,0 +1,1 @@@ ++3.0 (quilt) diff --cc debian/tests/control index 0000000,0000000..3c2c2e0 new file mode 100644 --- /dev/null +++ b/debian/tests/control @@@ -1,0 -1,0 +1,7 @@@ ++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 diff --cc debian/tests/run-nose-tests index 0000000,0000000..75c3ba6 new file mode 100755 --- /dev/null +++ b/debian/tests/run-nose-tests @@@ -1,0 -1,0 +1,21 @@@ ++#!/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 ++ diff --cc debian/tests/run-nose3-tests index 0000000,0000000..ffa0b12 new file mode 100755 --- /dev/null +++ b/debian/tests/run-nose3-tests @@@ -1,0 -1,0 +1,10 @@@ ++#!/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 diff --cc debian/upstream/metadata index 0000000,0000000..8083d61 new file mode 100644 --- /dev/null +++ b/debian/upstream/metadata @@@ -1,0 -1,0 +1,7 @@@ ++Registry: ++ - Name: OMICtools ++ Entry: OMICS_19073 ++ - Name: RRID ++ Entry: NA ++ - Name: bio.tools ++ Entry: pysam diff --cc debian/watch index 0000000,0000000..76b8db8 new file mode 100644 --- /dev/null +++ b/debian/watch @@@ -1,0 -1,0 +1,5 @@@ ++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