diff options
author | David Seifert <soap@gentoo.org> | 2020-08-03 18:54:29 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2020-08-03 18:54:29 +0200 |
commit | 98949b9dddb793b4f2834beb4888df6204322699 (patch) | |
tree | fb629c651efddb29e6222666050e1a8315fb024d /sci-biology | |
parent | sci-biology/bcftools: Bump to version 1.10.2 (diff) | |
download | gentoo-98949b9dddb793b4f2834beb4888df6204322699.tar.gz gentoo-98949b9dddb793b4f2834beb4888df6204322699.tar.bz2 gentoo-98949b9dddb793b4f2834beb4888df6204322699.zip |
sci-biology/pysam: Bump to 0.16.0.1
Bug: https://bugs.gentoo.org/645060
Bug: https://bugs.gentoo.org/646986
Bug: https://bugs.gentoo.org/718472
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sci-biology')
-rw-r--r-- | sci-biology/pysam/Manifest | 1 | ||||
-rw-r--r-- | sci-biology/pysam/files/pysam-0.16.0.1-fix-tests.patch | 37 | ||||
-rw-r--r-- | sci-biology/pysam/pysam-0.16.0.1.ebuild | 60 |
3 files changed, 98 insertions, 0 deletions
diff --git a/sci-biology/pysam/Manifest b/sci-biology/pysam/Manifest index 76bd71ffeb55..661592294a2b 100644 --- a/sci-biology/pysam/Manifest +++ b/sci-biology/pysam/Manifest @@ -1 +1,2 @@ DIST pysam-0.12.0.1.tar.gz 2672020 BLAKE2B 4bc6330405724f7b1126da91ba3338687f4dd17f015895f42b971f22ffbb6c32eda65e2667035a4cc830c0370b34d95d3aa6ae0f026b2b3276af1fd6841eed28 SHA512 31460ca98ad2ac5489905ffce76bfbb5bf4a295159f3cc8e088c78dcfbfc34b30d6f7871fd1454de01da98f82b7438ac2aca678a771d7b97ae0029a418f29f1d +DIST pysam-0.16.0.1.tar.gz 3294073 BLAKE2B 8df1c9b061b0d4b3962ff4b0e30f1589e02d7df41ce362bff861596d3599bf800bb16b2fa4de326fc07102dc7801b48c6b821e5d47e694a3536bec2c5b1cfece SHA512 5cebb9f3bc8dc6186a629e91423a3c8cb802af6529b943fcd880e056661ec6ee2a00de789cf144c9e40b9d1ef2459c0e06ce27a1b9eab8e2875d2087f275af28 diff --git a/sci-biology/pysam/files/pysam-0.16.0.1-fix-tests.patch b/sci-biology/pysam/files/pysam-0.16.0.1-fix-tests.patch new file mode 100644 index 000000000000..9d269878e651 --- /dev/null +++ b/sci-biology/pysam/files/pysam-0.16.0.1-fix-tests.patch @@ -0,0 +1,37 @@ +--- a/tests/pysam_data/Makefile ++++ b/tests/pysam_data/Makefile +@@ -3,7 +3,7 @@ + BAI=$(BAM:%.bam=%.bam.bai) + CRAM=ex1.cram ex2.cram ex3.cram + CRAI=$(CRAM:%.cram=%.cram.crai) +-NO_PG:=$(findstring --no-PG,$(shell samtools view)) ++NO_PG:=--no-PG + + # ex2.bam - bam file without index + +--- a/tests/tabix_test.py ++++ b/tests/tabix_test.py +@@ -14,6 +14,7 @@ + import subprocess + import glob + import re ++import pytest + from TestUtils import checkBinaryEqual, checkGZBinaryEqual, check_url, \ + load_and_convert, TABIX_DATADIR, get_temp_filename + +@@ -1014,6 +1015,7 @@ + globals()[n] = type(n, (TestVCFFromVariantFile,), dict(filename=vcf_file,)) + + ++@pytest.mark.skip(reason="requires internet connectivity") + class TestRemoteFileHTTP(unittest.TestCase): + + url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example.gtf.gz" +@@ -1053,6 +1055,7 @@ + self.assertEqual(list(self.local_file.header), []) + + ++@pytest.mark.skip(reason="requires internet connectivity") + class TestRemoteFileHTTPWithHeader(TestRemoteFileHTTP): + + url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example_comments.gtf.gz" diff --git a/sci-biology/pysam/pysam-0.16.0.1.ebuild b/sci-biology/pysam/pysam-0.16.0.1.ebuild new file mode 100644 index 000000000000..acc0cb99892f --- /dev/null +++ b/sci-biology/pysam/pysam-0.16.0.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) + +inherit distutils-r1 + +DESCRIPTION="Python interface for the SAM/BAM sequence alignment and mapping format" +HOMEPAGE=" + https://github.com/pysam-developers/pysam + https://pypi.org/project/pysam/" +SRC_URI="https://github.com/pysam-developers/pysam/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="=sci-libs/htslib-1.10*:=" +DEPEND="${RDEPEND} + dev-python/cython[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}]" +BDEPEND=" + test? ( + =sci-biology/bcftools-1.10* + =sci-biology/samtools-1.10* + )" + +distutils_enable_tests pytest + +DISTUTILS_IN_SOURCE_BUILD=1 + +python_prepare_all() { + # unbundle htslib + export HTSLIB_MODE="external" + export HTSLIB_INCLUDE_DIR="${EPREFIX}"/usr/include + export HTSLIB_LIBRARY_DIR="${EPREFIX}"/usr/$(get_libdir) + rm -r htslib || die + + # prevent setup.py from adding RPATHs (except $ORIGIN) + sed -e '/runtime_library_dirs=htslib_library_dirs/d' \ + -i setup.py || die + + eapply "${FILESDIR}"/${PN}-0.16.0.1-fix-tests.patch + + if use test; then + einfo "Building test data" + emake -C tests/pysam_data + emake -C tests/cbcf_data + fi + + distutils-r1_python_prepare_all +} + +python_compile() { + # breaks with parallel build + local MAKEOPTS=-j1 + distutils-r1_python_compile +} |