From 9f48a3a78d9dfa5322a67dade7beb5d02b220711 Mon Sep 17 00:00:00 2001 From: Steffen Moeller Date: Fri, 14 Sep 2018 09:44:51 +0100 Subject: [PATCH] Import python-pysam_0.15.1+ds-1.debian.tar.xz [dgit import tarball python-pysam 0.15.1+ds-1 python-pysam_0.15.1+ds-1.debian.tar.xz] --- changelog | 339 +++++++++++++++++++ clean | 4 + compat | 1 + control | 64 ++++ copyright | 156 +++++++++ gbp.conf | 5 + patches/series | 2 + patches/skip_test_needing_missing_data.patch | 22 ++ patches/skip_test_remote.patch | 76 +++++ python-pysam-tests.README.Debian | 8 + python-pysam-tests.docs | 2 + python-pysam-tests.install | 1 + python-pysam-tests.lintian-overrides | 5 + python-pysam.links | 4 + python-pysam.lintian-overrides | 4 + python3-pysam.lintian-overrides | 4 + rules | 74 ++++ source/format | 1 + tests/control.autodep8 | 7 + tests/run-nose-tests | 21 ++ tests/run-nose3-tests | 10 + upstream/metadata | 7 + watch | 5 + 23 files changed, 822 insertions(+) create mode 100644 changelog create mode 100644 clean create mode 100644 compat create mode 100644 control create mode 100644 copyright create mode 100644 gbp.conf create mode 100644 patches/series create mode 100644 patches/skip_test_needing_missing_data.patch create mode 100644 patches/skip_test_remote.patch create mode 100644 python-pysam-tests.README.Debian create mode 100644 python-pysam-tests.docs create mode 100644 python-pysam-tests.install create mode 100644 python-pysam-tests.lintian-overrides create mode 100755 python-pysam.links create mode 100644 python-pysam.lintian-overrides create mode 100644 python3-pysam.lintian-overrides create mode 100755 rules create mode 100644 source/format create mode 100644 tests/control.autodep8 create mode 100755 tests/run-nose-tests create mode 100755 tests/run-nose3-tests create mode 100644 upstream/metadata create mode 100644 watch diff --git a/changelog b/changelog new file mode 100644 index 0000000..1ae16cf --- /dev/null +++ b/changelog @@ -0,0 +1,339 @@ +python-pysam (0.15.1+ds-1) unstable; urgency=medium + + * Team upload. + + * New upstream version. + - Removes autogenerated config.h - [many thanks!] + https://github.com/pysam-developers/pysam/issues/714 + - Explicit compatibility with Python 3.7 + * Removed patch skipping test that complained on missing file + + -- Steffen Moeller Fri, 14 Sep 2018 10:44:51 +0200 + +python-pysam (0.15.0.1+ds-2) unstable; urgency=medium + + * Remove ancient fields X-Python*-Version + * Adjust patches for build time test suite + * Standards-Version: 4.2.1 + + -- Andreas Tille Wed, 12 Sep 2018 18:37:42 +0200 + +python-pysam (0.15.0.1+ds-1) experimental; urgency=medium + + * Team upload. + + [ Steffen Moeller ] + * New upstream version. + + [ Afif Elghraoui ] + * New upstream version 0.14.1+ds + * Update patches + + [ Andreas Tille ] + * Testsuite: autopkgtest-pkg-python + * Rename d/tests/control to d/tests/control.autodep8 + * Standards-Version: 4.1.4 + + -- Steffen Moeller Sun, 29 Jul 2018 00:51:38 +0200 + +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 --git a/clean b/clean new file mode 100644 index 0000000..6987d15 --- /dev/null +++ b/clean @@ -0,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 --git a/compat b/compat new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/compat @@ -0,0 +1 @@ +11 diff --git a/control b/control new file mode 100644 index 0000000..f931d3f --- /dev/null +++ b/control @@ -0,0 +1,64 @@ +Source: python-pysam +Maintainer: Debian Med Packaging Team +Uploaders: Charles Plessy , + Andreas Tille , + Afif Elghraoui +Section: python +Testsuite: autopkgtest-pkg-python +Priority: optional +Build-Depends: debhelper (>= 11~), + dh-exec, + dh-python, + libhts-dev (>= 1.9), + zlib1g-dev, + python-all-dev, + python-setuptools, + cython (>= 0.23), + python3-all-dev, + python3-setuptools, + cython3 (>= 0.23), + tabix , + samtools (>= 1.9) , + bcftools (>= 1.9) , + python-pytest , + python3-pytest +Standards-Version: 4.2.1 +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 + +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 --git a/copyright b/copyright new file mode 100644 index 0000000..39dcc02 --- /dev/null +++ b/copyright @@ -0,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 --git a/gbp.conf b/gbp.conf new file mode 100644 index 0000000..bf424bb --- /dev/null +++ b/gbp.conf @@ -0,0 +1,5 @@ +# This source package is managed with git-buildpackage and pristine-tar. + +[DEFAULT] +# use pristine-tar: +pristine-tar = True diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..9a83180 --- /dev/null +++ b/patches/series @@ -0,0 +1,2 @@ +skip_test_remote.patch +skip_test_needing_missing_data.patch diff --git a/patches/skip_test_needing_missing_data.patch b/patches/skip_test_needing_missing_data.patch new file mode 100644 index 0000000..d4f2563 --- /dev/null +++ b/patches/skip_test_needing_missing_data.patch @@ -0,0 +1,22 @@ +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 + +Index: python-pysam/tests/AlignmentFile_test.py +=================================================================== +--- python-pysam.orig/tests/AlignmentFile_test.py ++++ python-pysam/tests/AlignmentFile_test.py +@@ -1402,11 +1402,6 @@ 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 TestMismatchingHeader(unittest.TestCase): + '''see issue 716.''' diff --git a/patches/skip_test_remote.patch b/patches/skip_test_remote.patch new file mode 100644 index 0000000..4065c70 --- /dev/null +++ b/patches/skip_test_remote.patch @@ -0,0 +1,76 @@ +Author: Andreas Tille +Last-Update: Tue, 11 Sep 2018 14:12:55 +0200 +Description: Skip tests trying to access remote site + +Index: python-pysam/tests/AlignmentFile_test.py +=================================================================== +--- python-pysam.orig/tests/AlignmentFile_test.py ++++ python-pysam/tests/AlignmentFile_test.py +@@ -1623,6 +1623,7 @@ class TestDoubleFetchCRAMWithReference(T + reference_filename = os.path.join(BAM_DATADIR, 'ex1.fa') + + ++@unittest.skip + class TestRemoteFileFTP(unittest.TestCase): + + '''test remote access. +Index: python-pysam/tests/tabix_test.py +=================================================================== +--- python-pysam.orig/tests/tabix_test.py ++++ python-pysam/tests/tabix_test.py +@@ -1039,6 +1039,7 @@ for vcf_file in vcf_files: + globals()[n] = type(n, (TestVCFFromVariantFile,), dict(filename=vcf_file,)) + + ++@unittest.skip + class TestRemoteFileHTTP(unittest.TestCase): + + url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example.gtf.gz" +@@ -1078,25 +1079,28 @@ class TestRemoteFileHTTP(unittest.TestCa + 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 check_url(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) ++#@unittest.skip # this leads to ++ # E TypeError: Error when calling the metaclass bases ++ # E function() argument 1 must be code, not str ++#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 check_url(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): diff --git a/python-pysam-tests.README.Debian b/python-pysam-tests.README.Debian new file mode 100644 index 0000000..0c7ed43 --- /dev/null +++ b/python-pysam-tests.README.Debian @@ -0,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 --git a/python-pysam-tests.docs b/python-pysam-tests.docs new file mode 100644 index 0000000..8e41b76 --- /dev/null +++ b/python-pysam-tests.docs @@ -0,0 +1,2 @@ +debian/tests/run-nose-tests +debian/tests/run-nose3-tests diff --git a/python-pysam-tests.install b/python-pysam-tests.install new file mode 100644 index 0000000..a99a578 --- /dev/null +++ b/python-pysam-tests.install @@ -0,0 +1 @@ +tests usr/share/doc/python-pysam diff --git a/python-pysam-tests.lintian-overrides b/python-pysam-tests.lintian-overrides new file mode 100644 index 0000000..1dfb2c6 --- /dev/null +++ b/python-pysam-tests.lintian-overrides @@ -0,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 \ No newline at end of file diff --git a/python-pysam.links b/python-pysam.links new file mode 100755 index 0000000..8cc3b2c --- /dev/null +++ b/python-pysam.links @@ -0,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 --git a/python-pysam.lintian-overrides b/python-pysam.lintian-overrides new file mode 100644 index 0000000..785680d --- /dev/null +++ b/python-pysam.lintian-overrides @@ -0,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 --git a/python3-pysam.lintian-overrides b/python3-pysam.lintian-overrides new file mode 100644 index 0000000..288316d --- /dev/null +++ b/python3-pysam.lintian-overrides @@ -0,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 --git a/rules b/rules new file mode 100755 index 0000000..173161f --- /dev/null +++ b/rules @@ -0,0 +1,74 @@ +#!/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 # which deletes files tested + 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 + rm -rf .pytest_cache/ + diff --git a/source/format b/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/tests/control.autodep8 b/tests/control.autodep8 new file mode 100644 index 0000000..3c2c2e0 --- /dev/null +++ b/tests/control.autodep8 @@ -0,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 --git a/tests/run-nose-tests b/tests/run-nose-tests new file mode 100755 index 0000000..75c3ba6 --- /dev/null +++ b/tests/run-nose-tests @@ -0,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 --git a/tests/run-nose3-tests b/tests/run-nose3-tests new file mode 100755 index 0000000..ffa0b12 --- /dev/null +++ b/tests/run-nose3-tests @@ -0,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 --git a/upstream/metadata b/upstream/metadata new file mode 100644 index 0000000..8083d61 --- /dev/null +++ b/upstream/metadata @@ -0,0 +1,7 @@ +Registry: + - Name: OMICtools + Entry: OMICS_19073 + - Name: RRID + Entry: NA + - Name: bio.tools + Entry: pysam diff --git a/watch b/watch new file mode 100644 index 0000000..76b8db8 --- /dev/null +++ b/watch @@ -0,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 -- 2.30.2