From 120f18a71d0af536fbd77f37c544f7adf8591322 Mon Sep 17 00:00:00 2001 From: Nilesh Patra Date: Sat, 31 Dec 2022 16:56:09 +0000 Subject: [PATCH] Import python-pysam_0.20.0+ds-3.debian.tar.xz [dgit import tarball python-pysam 0.20.0+ds-3 python-pysam_0.20.0+ds-3.debian.tar.xz] --- changelog | 529 +++++++++++++++++++++++++ clean | 4 + control | 50 +++ copyright | 76 ++++ patches/clean_less | 15 + patches/disable-tests-python3.11.patch | 28 ++ patches/python3.11.patch | 14 + patches/series | 5 + patches/skip-test-on-32-bit.patch | 29 ++ patches/skip_test_remote.patch | 90 +++++ python-pysam-tests.README.Debian | 8 + python-pysam-tests.install | 1 + python-pysam-tests.lintian-overrides | 3 + python-pysam.links | 4 + python-pysam.lintian-overrides | 4 + python3-pysam.lintian-overrides | 4 + rules | 72 ++++ salsa-ci.yml | 4 + source/format | 1 + tests/control | 3 + upstream/metadata | 13 + watch | 5 + 22 files changed, 962 insertions(+) create mode 100644 changelog create mode 100644 clean create mode 100644 control create mode 100644 copyright create mode 100644 patches/clean_less create mode 100644 patches/disable-tests-python3.11.patch create mode 100644 patches/python3.11.patch create mode 100644 patches/series create mode 100644 patches/skip-test-on-32-bit.patch create mode 100644 patches/skip_test_remote.patch create mode 100644 python-pysam-tests.README.Debian 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 salsa-ci.yml create mode 100644 source/format create mode 100644 tests/control create mode 100644 upstream/metadata create mode 100644 watch diff --git a/changelog b/changelog new file mode 100644 index 0000000..15e9c05 --- /dev/null +++ b/changelog @@ -0,0 +1,529 @@ +python-pysam (0.20.0+ds-3) unstable; urgency=medium + + * Team Upload. + * Add patch to fix proper "SO" extension. + + -- Nilesh Patra Sat, 31 Dec 2022 22:26:09 +0530 + +python-pysam (0.20.0+ds-2) unstable; urgency=medium + + * disable-tests-python3.11.patch: add; work around test failure. + Thanks to John Marshall and Graham Inggs (Closes: #1024425) + * d/control: restore dependency on python3-all-dev. + * d/control: restore autodep8-python autopkgtest. + * Standards-Version: 4.6.2 (routine-update) + + -- Étienne Mollier Tue, 27 Dec 2022 11:41:25 +0100 + +python-pysam (0.20.0+ds-1) unstable; urgency=medium + + * New upstream version + * Update lintian override info format in d/python-pysam.lintian-overrides on + line 4. + * skip_test_remote.patch: refresh. + * test-truncated-bam.patch: delete; applied upstream. + * d/control: make build only depend on python3-dev. + * d/control: disable autopkgtest-pkg-python due to missing python3.11 + support; classical autopkgtest is still active though. + + -- Étienne Mollier Tue, 29 Nov 2022 21:55:48 +0100 + +python-pysam (0.19.1+ds-1) unstable; urgency=medium + + [ Andreas Tille ] + * New upstream version + * Standards-Version: 4.6.1 (routine-update) + * Remove unused license definitions for LGPL-2.1+, BSD-3-clause. + + [ Étienne Mollier ] + * test-truncated-bam.patch: added; fix test truncated BAM failure. + Thanks to John Marshall + * d/*.lintian-overrides: refresh mismatches. + * d/control: add myself to uploaders. + * d/*.lintian-overrides: remove unused overrides. + + -- Étienne Mollier Sun, 02 Oct 2022 11:41:36 +0200 + +python-pysam (0.18.0+ds-1~exp2) experimental; urgency=medium + + * Bump Build-Depends: libhts-dev (>= 1.14~) + Closes: #1001284 + + -- Andreas Tille Wed, 08 Dec 2021 13:23:03 +0100 + +python-pysam (0.18.0+ds-1~exp1) experimental; urgency=medium + + * New upstream version + * No tab in license text (routine-update) + * Update renamed lintian tag names in lintian overrides. + * Avoid explicitly specifying -Wl,--as-needed linker flag. + * Remove constraints unnecessary since buster: + + Build-Depends: Drop versioned constraint on bcftools, libhts-dev and + samtools. + * Drop outdated and unused tests + + -- Andreas Tille Tue, 07 Dec 2021 15:14:07 +0100 + +python-pysam (0.17.0+ds-2) unstable; urgency=medium + + * Team Upload. + * Move from experimental to unstable + * Skip failing test on 32-bit + + -- Nilesh Patra Fri, 15 Oct 2021 13:17:18 +0530 + +python-pysam (0.17.0+ds-1) experimental; urgency=medium + + * Team Upload. + [ Andreas Tille ] + * debhelper-compat 13 (routine-update) + * Update copyright + * Do not ignore test results via '|| true' + * Exclude another test that is failing + + [ Nilesh Patra ] + * New upstream version 0.17.0+ds + * Standards version: 4.6.0 + * Bump watch file version to 4 + * Re-diff patches + + -- Nilesh Patra Fri, 15 Oct 2021 01:13:49 +0530 + +python-pysam (0.15.4+ds-3) unstable; urgency=medium + + * Remove Python2 package + Closes: #938092 + * Remove unneeded debian/gbp.conf + * Standards-Version: 4.5.0 (routine-update) + * Add salsa-ci file (routine-update) + * Rules-Requires-Root: no (routine-update) + * Set upstream metadata fields: Bug-Submit. + + -- Andreas Tille Fri, 08 May 2020 20:27:35 +0200 + +python-pysam (0.15.4+ds-2) unstable; urgency=medium + + * Dont run unittests for python2 binary, to reduce pytest rdeps + + -- Sandro Tosi Mon, 13 Apr 2020 23:49:01 -0400 + +python-pysam (0.15.4+ds-1) unstable; urgency=medium + + * Team upload. + * New upstream version + * python-pysam-tests: Multi-Arch: foreign + * Try to keep example_no_seq_in_header_null_bytes.bam from being deleted + + -- Michael R. Crusoe Thu, 23 Jan 2020 15:00:17 +0100 + +python-pysam (0.15.3+ds-5) unstable; urgency=medium + + [ Chris Lamb ] + * make the build reproducible + Closes: #948280 + + [ Andreas Tille ] + * Standards-Version: 4.4.1 + * debian/copyright: use spaces rather than tabs to start continuation + lines. + * Set upstream metadata fields: Bug-Database, Repository, Repository- + Browse. + + -- Andreas Tille Mon, 06 Jan 2020 17:44:23 +0100 + +python-pysam (0.15.3+ds-4) unstable; urgency=medium + + * Team upload. + * Replace missing hts_seek and hts_tell equivalents + + -- Michael R. Crusoe Sun, 05 Jan 2020 21:23:11 +0100 + +python-pysam (0.15.3+ds-3) unstable; urgency=medium + + * Team upload. + * -docs: oops, don't try to ship nonexistent debian/tests/run-nose{3,}-tests + + -- Michael R. Crusoe Sun, 05 Jan 2020 08:01:33 +0100 + +python-pysam (0.15.3+ds-2) unstable; urgency=medium + + * Team upload. + * new patch: Update deprecated samtools import test commands to samtools view + * new patch: Update samtools + bcftools to v1.10 + * disable tests for now + + -- Michael R. Crusoe Sat, 04 Jan 2020 23:19:04 +0100 + +python-pysam (0.15.3+ds-1) unstable; urgency=medium + + * Team upload. + * New upstream release. Not yet dropping py2 due to paleomix and pbsuite + * debhelper-compat 12 + * Standards-Version: 4.4.0 + * Trim trailing whitespace. + * Use secure URI in Homepage field. + * Set upstream metadata fields: Repository. + * New patch to remove symbols that were dropped in htslib 1.10: + hts_utell, hts_useek (Closes: #947426) + + -- Michael R. Crusoe Fri, 03 Jan 2020 21:25:33 +0100 + +python-pysam (0.15.2+ds-2) unstable; urgency=medium + + * Team upload. + * For the Tabix tests: test the index contents, not the compression scheme. + Closes: #919928, #920250 + + -- Michael R. Crusoe Wed, 20 Feb 2019 02:45:47 -0800 + +python-pysam (0.15.2+ds-1) unstable; urgency=medium + + * Team upload. + * New upstream version + * Standards-Version: 4.3.0, no changes needed + * added Py2 and Py3 versions of ${python:Provides} + * Fix lintian found spelling typos. + * debian/tests/control.autodep8 → debian/tests/control. + * remove errant log.txt from the packages. + + -- Michael R. Crusoe Thu, 17 Jan 2019 01:25:11 -0800 + +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/control b/control new file mode 100644 index 0000000..e5e006f --- /dev/null +++ b/control @@ -0,0 +1,50 @@ +Source: python-pysam +Maintainer: Debian Med Packaging Team +Uploaders: Charles Plessy , + Andreas Tille , + Étienne Mollier +Section: python +Testsuite: autopkgtest-pkg-python +Priority: optional +Build-Depends: debhelper-compat (= 13), + dh-exec, + dh-python, + libhts-dev (>= 1.14~), + zlib1g-dev, + python3-all-dev, + python3-setuptools, + cython3, + tabix , + samtools , + bcftools , + python3-pytest +Standards-Version: 4.6.2 +Vcs-Browser: https://salsa.debian.org/med-team/python-pysam +Vcs-Git: https://salsa.debian.org/med-team/python-pysam.git +Homepage: https://pysam.readthedocs.org/en/latest +Rules-Requires-Root: no + +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 +Multi-Arch: foreign +Depends: ${misc:Depends} +Enhances: python3-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..d7d4d9c --- /dev/null +++ b/copyright @@ -0,0 +1,76 @@ +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/* + win32 + .github + .gitignore + +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/padding.* +Copyright: 2011-2012 Broad Institute + 2014 Genome Research Ltd. + 2012-2013 Peter Cock, The James Hutton Institute +License: MIT + +Files: debian/* +Copyright: + 2015-2016 Afif Elghraoui + 2015 Jorge Soares + 2014-2015 Charles Plessy + 2014-2018 Andreas Tille +License: MIT + +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. diff --git a/patches/clean_less b/patches/clean_less new file mode 100644 index 0000000..b1ad6c7 --- /dev/null +++ b/patches/clean_less @@ -0,0 +1,15 @@ +Author: Michael R. Crusoe +Last-Update: 2020-01-23 14:31:06 +0100 +Description: Do not clean *.bam files + +--- a/tests/pysam_data/Makefile ++++ b/tests/pysam_data/Makefile +@@ -100,7 +100,7 @@ + cp ex1.cram $@ + + clean: +- rm -fr [a-z]*.bam *.bai *.csi *.fai *.gzi *.pileup* [a-z]*.cram *.crai \ ++ rm -fr *.bai *.csi *.fai *.gzi *.pileup* [a-z]*.cram *.crai \ + all.stamp *~ calDepth *.dSYM pysam_*.sam \ + ex2.sam ex2.sam.gz ex1.sam ex1.fa.gz \ + with_md.sam.gz \ diff --git a/patches/disable-tests-python3.11.patch b/patches/disable-tests-python3.11.patch new file mode 100644 index 0000000..ecc9936 --- /dev/null +++ b/patches/disable-tests-python3.11.patch @@ -0,0 +1,28 @@ +Description: skip tests bound to fail past python3.11. + Thanks John Marshall and Graham Inggs for the independent suggestion. +Author: Étienne Mollier +Bug: https://github.com/pysam-developers/pysam/issues/1151 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024425 +Last-Update: 2022-12-27 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- python-pysam.orig/tests/AlignmentFilePileup_test.py ++++ python-pysam/tests/AlignmentFilePileup_test.py +@@ -1,5 +1,6 @@ + """Benchmarking module for AlignmentFile functionality""" + import os ++import sys + import pysam + import unittest + from TestUtils import make_data_files, BAM_DATADIR, IS_PYTHON3, force_str, flatten_nested_list +@@ -206,6 +207,10 @@ + def tearDown(self): + self.samfile.close() + ++ @unittest.skipIf((sys.version_info.major == 3 ++ and sys.version_info.minor >= 11) ++ or sys.version_info.major >= 4, ++ "Test known to fail past python3.11.") + def testIteratorOutOfScope(self): + '''test if exception is raised if pileup col is accessed after + iterator is exhausted.''' diff --git a/patches/python3.11.patch b/patches/python3.11.patch new file mode 100644 index 0000000..507b31c --- /dev/null +++ b/patches/python3.11.patch @@ -0,0 +1,14 @@ +Description: Add patch to return proper sysconf so for current python +Author: Nilesh Patra +Last-Update: 2022-12-30 +--- a/pysam/__init__.py ++++ b/pysam/__init__.py +@@ -96,5 +96,7 @@ + if pysam.config.HTSLIB == "builtin": + pysam_libs.append('libchtslib') + +- so = sysconfig.get_config_var('SO') ++ so = sysconfig.get_config_var('EXT_SUFFIX') ++ if not so: ++ so = sysconfig.get_config_var('SO') + return [os.path.join(dirname, x + so) for x in pysam_libs] diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..973b469 --- /dev/null +++ b/patches/series @@ -0,0 +1,5 @@ +skip_test_remote.patch +clean_less +skip-test-on-32-bit.patch +disable-tests-python3.11.patch +python3.11.patch diff --git a/patches/skip-test-on-32-bit.patch b/patches/skip-test-on-32-bit.patch new file mode 100644 index 0000000..3ce4e32 --- /dev/null +++ b/patches/skip-test-on-32-bit.patch @@ -0,0 +1,29 @@ +--- a/tests/samtools_test.py ++++ b/tests/samtools_test.py +@@ -20,6 +20,7 @@ + check_samtools_view_equal, get_temp_filename, force_bytes, WORKDIR, \ + make_data_files, BAM_DATADIR + ++import platform + + IS_PYTHON3 = sys.version_info[0] >= 3 + +@@ -92,7 +93,7 @@ + "flagstat ex1.bam > %(out)s_ex1.flagstat", + # Fails python 3.3 on linux, passes on OsX and when + # run locally +- "calmd ex1.bam ex1.fa > %(out)s_ex1.calmd.bam", ++ #"calmd ex1.bam ex1.fa > %(out)s_ex1.calmd.bam", + # use -s option, otherwise the following error in samtools 1.2: + # Samtools-htslib-API: bam_get_library() not yet implemented + # causes downstream problems +@@ -118,6 +119,9 @@ + # ("addreplacerg -r 'RG\tID:ga\tSM:hs' ex1.bam > %(out)s_ex1.addreplacerg", + ] + ++ if platform.architecture()[0] == '64bit': ++ statements.append("calmd ex1.bam ex1.fa > %(out)s_ex1.calmd.bam") ++ + map_command = { + } + diff --git a/patches/skip_test_remote.patch b/patches/skip_test_remote.patch new file mode 100644 index 0000000..4268e59 --- /dev/null +++ b/patches/skip_test_remote.patch @@ -0,0 +1,90 @@ +Author: Andreas Tille +Last-Update: Tue, 11 Sep 2018 14:12:55 +0200 +Description: Skip tests trying to access remote site + +--- python-pysam.orig/tests/AlignmentFile_test.py ++++ python-pysam/tests/AlignmentFile_test.py +@@ -504,17 +504,6 @@ + "tmp_ex2.sam", + "rb", "wh") + +- def testBAM2CRAM(self): +- # ignore header (md5 sum) +- self.checkEcho("ex2.bam", +- "ex2.cram", +- "tmp_ex2.cram", +- "rb", "wc", +- sequence_filename=os.path.join(BAM_DATADIR, "ex1.fa"), +- checkf=partial( +- check_samtools_view_equal, +- without_header=True)) +- + def testCRAM2BAM(self): + # ignore header (md5 sum) + self.checkEcho("ex2.cram", +@@ -1640,6 +1629,7 @@ + reference_filename = os.path.join(BAM_DATADIR, 'ex1.fa') + + ++@unittest.skip + class TestRemoteFileFTP(unittest.TestCase): + + '''test remote access. +--- python-pysam.orig/tests/tabix_test.py ++++ python-pysam/tests/tabix_test.py +@@ -1017,6 +1017,7 @@ + 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" +@@ -1056,25 +1057,28 @@ + 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 getattr(pysam.config, "HAVE_LIBCURL", 0) 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 getattr(pysam.config, "HAVE_LIBCURL", 0) 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.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..1fa28b6 --- /dev/null +++ b/python-pysam-tests.lintian-overrides @@ -0,0 +1,3 @@ +# 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] 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..b9ca382 --- /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..0224eef --- /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..3381a06 --- /dev/null +++ b/rules @@ -0,0 +1,72 @@ +#!/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 + +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_python3=-k-XTestRemoteFileHTTP -k-XTestRemoteFileHTTPWithHeader + +clean: clean-tests +%: + dh $@ --with python3 --buildsystem=pybuild + +override_dh_install: clean-tests + dh_install -Xtest.gtf.gz + find debian -name log.txt -delete + +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_*.bam" -delete + find . -name "*.bai*" -delete + find . -name "*.cram*" -delete + find . -name "pysam_uncompressed.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 + rm -rf .pytest_cache/ diff --git a/salsa-ci.yml b/salsa-ci.yml new file mode 100644 index 0000000..33c3a64 --- /dev/null +++ b/salsa-ci.yml @@ -0,0 +1,4 @@ +--- +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml 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 b/tests/control new file mode 100644 index 0000000..6dc4058 --- /dev/null +++ b/tests/control @@ -0,0 +1,3 @@ +Test-Command: export HOME=$PWD && 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/upstream/metadata b/upstream/metadata new file mode 100644 index 0000000..95241be --- /dev/null +++ b/upstream/metadata @@ -0,0 +1,13 @@ +Bug-Submit: https://github.com/pysam-developers/pysam/issues/new +Registry: +- Name: OMICtools + Entry: OMICS_19073 +- Name: SciCrunch + Entry: NA +- Name: bio.tools + Entry: pysam +- Name: conda:bioconda + Entry: pysam +Repository: https://github.com/pysam-developers/pysam.git +Bug-Database: https://github.com/pysam-developers/pysam/issues +Repository-Browse: https://github.com/pysam-developers/pysam diff --git a/watch b/watch new file mode 100644 index 0000000..c714a54 --- /dev/null +++ b/watch @@ -0,0 +1,5 @@ +version=4 + +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