1 |
commit: 938a340079ee1b725936dad3e441faf8cc3420cd |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 3 17:41:39 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 3 17:41:39 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=938a3400 |
7 |
|
8 |
sci-biology/pysam: add 0.17.0 |
9 |
|
10 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
11 |
|
12 |
sci-biology/pysam/Manifest | 1 + |
13 |
sci-biology/pysam/pysam-0.17.0.ebuild | 66 +++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 67 insertions(+) |
15 |
|
16 |
diff --git a/sci-biology/pysam/Manifest b/sci-biology/pysam/Manifest |
17 |
index f349d8ddc8a..1e305c998da 100644 |
18 |
--- a/sci-biology/pysam/Manifest |
19 |
+++ b/sci-biology/pysam/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST pysam-0.16.0.1.tar.gz 3294073 BLAKE2B 8df1c9b061b0d4b3962ff4b0e30f1589e02d7df41ce362bff861596d3599bf800bb16b2fa4de326fc07102dc7801b48c6b821e5d47e694a3536bec2c5b1cfece SHA512 5cebb9f3bc8dc6186a629e91423a3c8cb802af6529b943fcd880e056661ec6ee2a00de789cf144c9e40b9d1ef2459c0e06ce27a1b9eab8e2875d2087f275af28 |
22 |
+DIST pysam-0.17.0.tar.gz 3579324 BLAKE2B 6b88fe771350f20fa7c90a4c02c60fefd6a34d979c687fce1e34a17e1ff203c7d2d07e36b64f7a73f99676b805334df7f049932ce15e26362a5214da03435d64 SHA512 16740f08fb68a1f24656454b834dd9ac52ad9f864f307564566fc244bbd2efb7cb17107b2e85ca5c56af817918a138d1c071533de1b80e5bba42b01bbad7f552 |
23 |
|
24 |
diff --git a/sci-biology/pysam/pysam-0.17.0.ebuild b/sci-biology/pysam/pysam-0.17.0.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..afdc4777e20 |
27 |
--- /dev/null |
28 |
+++ b/sci-biology/pysam/pysam-0.17.0.ebuild |
29 |
@@ -0,0 +1,66 @@ |
30 |
+# Copyright 1999-2021 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=8 |
34 |
+ |
35 |
+PYTHON_COMPAT=( python3_{8..10} ) |
36 |
+ |
37 |
+inherit distutils-r1 |
38 |
+ |
39 |
+DESCRIPTION="Python interface for the SAM/BAM sequence alignment and mapping format" |
40 |
+HOMEPAGE=" |
41 |
+ https://github.com/pysam-developers/pysam |
42 |
+ https://pypi.org/project/pysam/" |
43 |
+SRC_URI="https://github.com/pysam-developers/pysam/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
44 |
+ |
45 |
+LICENSE="MIT" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~amd64 ~x86" |
48 |
+ |
49 |
+RDEPEND="=sci-libs/htslib-1.13*:=" |
50 |
+DEPEND="${RDEPEND} |
51 |
+ dev-python/cython[${PYTHON_USEDEP}] |
52 |
+ dev-python/setuptools[${PYTHON_USEDEP}]" |
53 |
+BDEPEND=" |
54 |
+ test? ( |
55 |
+ =sci-biology/bcftools-1.13* |
56 |
+ =sci-biology/samtools-1.13* |
57 |
+ )" |
58 |
+ |
59 |
+distutils_enable_tests pytest |
60 |
+ |
61 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
62 |
+ |
63 |
+EPYTEST_DESELECT=( |
64 |
+ # only work with bundled htslib |
65 |
+ 'tests/tabix_test.py::TestRemoteFileHTTP' |
66 |
+ 'tests/tabix_test.py::TestRemoteFileHTTPWithHeader' |
67 |
+) |
68 |
+ |
69 |
+python_prepare_all() { |
70 |
+ # unbundle htslib |
71 |
+ export HTSLIB_MODE="external" |
72 |
+ export HTSLIB_INCLUDE_DIR="${EPREFIX}"/usr/include |
73 |
+ export HTSLIB_LIBRARY_DIR="${EPREFIX}"/usr/$(get_libdir) |
74 |
+ rm -r htslib || die |
75 |
+ |
76 |
+ # prevent setup.py from adding RPATHs (except $ORIGIN) |
77 |
+ sed -e '/runtime_library_dirs=htslib_library_dirs/d' \ |
78 |
+ -i setup.py || die |
79 |
+ |
80 |
+ if use test; then |
81 |
+ einfo "Building test data" |
82 |
+ emake -C tests/pysam_data |
83 |
+ emake -C tests/cbcf_data |
84 |
+ fi |
85 |
+ |
86 |
+ distutils-r1_python_prepare_all |
87 |
+} |
88 |
+ |
89 |
+python_compile() { |
90 |
+ # breaks with parallel build |
91 |
+ # need to avoid dropping .so plugins into |
92 |
+ # build-lib, which breaks tests |
93 |
+ esetup.py build_ext --inplace -j1 |
94 |
+ distutils-r1_python_compile -j1 |
95 |
+} |