1 |
commit: 98949b9dddb793b4f2834beb4888df6204322699 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 3 16:54:29 2020 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 3 16:54:29 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98949b9d |
7 |
|
8 |
sci-biology/pysam: Bump to 0.16.0.1 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/645060 |
11 |
Bug: https://bugs.gentoo.org/646986 |
12 |
Bug: https://bugs.gentoo.org/718472 |
13 |
Package-Manager: Portage-3.0.1, Repoman-2.3.23 |
14 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
15 |
|
16 |
sci-biology/pysam/Manifest | 1 + |
17 |
.../pysam/files/pysam-0.16.0.1-fix-tests.patch | 37 +++++++++++++ |
18 |
sci-biology/pysam/pysam-0.16.0.1.ebuild | 60 ++++++++++++++++++++++ |
19 |
3 files changed, 98 insertions(+) |
20 |
|
21 |
diff --git a/sci-biology/pysam/Manifest b/sci-biology/pysam/Manifest |
22 |
index 76bd71ffeb5..661592294a2 100644 |
23 |
--- a/sci-biology/pysam/Manifest |
24 |
+++ b/sci-biology/pysam/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
DIST pysam-0.12.0.1.tar.gz 2672020 BLAKE2B 4bc6330405724f7b1126da91ba3338687f4dd17f015895f42b971f22ffbb6c32eda65e2667035a4cc830c0370b34d95d3aa6ae0f026b2b3276af1fd6841eed28 SHA512 31460ca98ad2ac5489905ffce76bfbb5bf4a295159f3cc8e088c78dcfbfc34b30d6f7871fd1454de01da98f82b7438ac2aca678a771d7b97ae0029a418f29f1d |
27 |
+DIST pysam-0.16.0.1.tar.gz 3294073 BLAKE2B 8df1c9b061b0d4b3962ff4b0e30f1589e02d7df41ce362bff861596d3599bf800bb16b2fa4de326fc07102dc7801b48c6b821e5d47e694a3536bec2c5b1cfece SHA512 5cebb9f3bc8dc6186a629e91423a3c8cb802af6529b943fcd880e056661ec6ee2a00de789cf144c9e40b9d1ef2459c0e06ce27a1b9eab8e2875d2087f275af28 |
28 |
|
29 |
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 |
30 |
new file mode 100644 |
31 |
index 00000000000..9d269878e65 |
32 |
--- /dev/null |
33 |
+++ b/sci-biology/pysam/files/pysam-0.16.0.1-fix-tests.patch |
34 |
@@ -0,0 +1,37 @@ |
35 |
+--- a/tests/pysam_data/Makefile |
36 |
++++ b/tests/pysam_data/Makefile |
37 |
+@@ -3,7 +3,7 @@ |
38 |
+ BAI=$(BAM:%.bam=%.bam.bai) |
39 |
+ CRAM=ex1.cram ex2.cram ex3.cram |
40 |
+ CRAI=$(CRAM:%.cram=%.cram.crai) |
41 |
+-NO_PG:=$(findstring --no-PG,$(shell samtools view)) |
42 |
++NO_PG:=--no-PG |
43 |
+ |
44 |
+ # ex2.bam - bam file without index |
45 |
+ |
46 |
+--- a/tests/tabix_test.py |
47 |
++++ b/tests/tabix_test.py |
48 |
+@@ -14,6 +14,7 @@ |
49 |
+ import subprocess |
50 |
+ import glob |
51 |
+ import re |
52 |
++import pytest |
53 |
+ from TestUtils import checkBinaryEqual, checkGZBinaryEqual, check_url, \ |
54 |
+ load_and_convert, TABIX_DATADIR, get_temp_filename |
55 |
+ |
56 |
+@@ -1014,6 +1015,7 @@ |
57 |
+ globals()[n] = type(n, (TestVCFFromVariantFile,), dict(filename=vcf_file,)) |
58 |
+ |
59 |
+ |
60 |
++@×××××××××××.skip(reason="requires internet connectivity") |
61 |
+ class TestRemoteFileHTTP(unittest.TestCase): |
62 |
+ |
63 |
+ url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example.gtf.gz" |
64 |
+@@ -1053,6 +1055,7 @@ |
65 |
+ self.assertEqual(list(self.local_file.header), []) |
66 |
+ |
67 |
+ |
68 |
++@×××××××××××.skip(reason="requires internet connectivity") |
69 |
+ class TestRemoteFileHTTPWithHeader(TestRemoteFileHTTP): |
70 |
+ |
71 |
+ url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example_comments.gtf.gz" |
72 |
|
73 |
diff --git a/sci-biology/pysam/pysam-0.16.0.1.ebuild b/sci-biology/pysam/pysam-0.16.0.1.ebuild |
74 |
new file mode 100644 |
75 |
index 00000000000..acc0cb99892 |
76 |
--- /dev/null |
77 |
+++ b/sci-biology/pysam/pysam-0.16.0.1.ebuild |
78 |
@@ -0,0 +1,60 @@ |
79 |
+# Copyright 1999-2020 Gentoo Authors |
80 |
+# Distributed under the terms of the GNU General Public License v2 |
81 |
+ |
82 |
+EAPI=7 |
83 |
+ |
84 |
+PYTHON_COMPAT=( python3_{6..9} ) |
85 |
+ |
86 |
+inherit distutils-r1 |
87 |
+ |
88 |
+DESCRIPTION="Python interface for the SAM/BAM sequence alignment and mapping format" |
89 |
+HOMEPAGE=" |
90 |
+ https://github.com/pysam-developers/pysam |
91 |
+ https://pypi.org/project/pysam/" |
92 |
+SRC_URI="https://github.com/pysam-developers/pysam/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
93 |
+ |
94 |
+LICENSE="MIT" |
95 |
+SLOT="0" |
96 |
+KEYWORDS="~amd64 ~x86" |
97 |
+ |
98 |
+RDEPEND="=sci-libs/htslib-1.10*:=" |
99 |
+DEPEND="${RDEPEND} |
100 |
+ dev-python/cython[${PYTHON_USEDEP}] |
101 |
+ dev-python/setuptools[${PYTHON_USEDEP}]" |
102 |
+BDEPEND=" |
103 |
+ test? ( |
104 |
+ =sci-biology/bcftools-1.10* |
105 |
+ =sci-biology/samtools-1.10* |
106 |
+ )" |
107 |
+ |
108 |
+distutils_enable_tests pytest |
109 |
+ |
110 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
111 |
+ |
112 |
+python_prepare_all() { |
113 |
+ # unbundle htslib |
114 |
+ export HTSLIB_MODE="external" |
115 |
+ export HTSLIB_INCLUDE_DIR="${EPREFIX}"/usr/include |
116 |
+ export HTSLIB_LIBRARY_DIR="${EPREFIX}"/usr/$(get_libdir) |
117 |
+ rm -r htslib || die |
118 |
+ |
119 |
+ # prevent setup.py from adding RPATHs (except $ORIGIN) |
120 |
+ sed -e '/runtime_library_dirs=htslib_library_dirs/d' \ |
121 |
+ -i setup.py || die |
122 |
+ |
123 |
+ eapply "${FILESDIR}"/${PN}-0.16.0.1-fix-tests.patch |
124 |
+ |
125 |
+ if use test; then |
126 |
+ einfo "Building test data" |
127 |
+ emake -C tests/pysam_data |
128 |
+ emake -C tests/cbcf_data |
129 |
+ fi |
130 |
+ |
131 |
+ distutils-r1_python_prepare_all |
132 |
+} |
133 |
+ |
134 |
+python_compile() { |
135 |
+ # breaks with parallel build |
136 |
+ local MAKEOPTS=-j1 |
137 |
+ distutils-r1_python_compile |
138 |
+} |