commit:     524b1d19c53df3a7f3ba688a0fd08f92a1539fa3
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 10 12:41:49 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Jun 10 12:41:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=524b1d19

sci-biology/pysam: add 0.19.1

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sci-biology/pysam/Manifest            |  1 +
 sci-biology/pysam/pysam-0.19.1.ebuild | 66 +++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)

diff --git a/sci-biology/pysam/Manifest b/sci-biology/pysam/Manifest
index 91ca2cac79c1..1e0c911e03c6 100644
--- a/sci-biology/pysam/Manifest
+++ b/sci-biology/pysam/Manifest
@@ -1 +1,2 @@
 DIST pysam-0.17.0.tar.gz 3579324 BLAKE2B 
6b88fe771350f20fa7c90a4c02c60fefd6a34d979c687fce1e34a17e1ff203c7d2d07e36b64f7a73f99676b805334df7f049932ce15e26362a5214da03435d64
 SHA512 
16740f08fb68a1f24656454b834dd9ac52ad9f864f307564566fc244bbd2efb7cb17107b2e85ca5c56af817918a138d1c071533de1b80e5bba42b01bbad7f552
+DIST pysam-0.19.1.gh.tar.gz 3649711 BLAKE2B 
dac3ab5a86ef95048e966fc007a0aa1c96ca8498f7c2672c2ed024f34b508bac42048e58b8ae0b538cea137a51e1874bb5c2c4976c7f3dc657a4c2cf5f9a27fb
 SHA512 
719f3a15e7dd277a90cce7f938b674ff86ef6b8f2d3440c3a0bf2ea22c4fbc2b3c9e0cf297d958c99e09dcd6e9905f32e8c632158aa8d5af8210e79705e1c479

diff --git a/sci-biology/pysam/pysam-0.19.1.ebuild 
b/sci-biology/pysam/pysam-0.19.1.ebuild
new file mode 100644
index 000000000000..70bfcb09dfe8
--- /dev/null
+++ b/sci-biology/pysam/pysam-0.19.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+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}.gh.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="=sci-libs/htslib-1.15.1*:="
+DEPEND="${RDEPEND}
+       dev-python/cython[${PYTHON_USEDEP}]
+       dev-python/setuptools[${PYTHON_USEDEP}]"
+BDEPEND="
+       test? (
+               =sci-biology/bcftools-1.15.1*
+               =sci-biology/samtools-1.15.1*
+       )"
+
+distutils_enable_tests pytest
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+EPYTEST_DESELECT=(
+       # only work with bundled htslib
+       'tests/tabix_test.py::TestRemoteFileHTTP'
+       'tests/tabix_test.py::TestRemoteFileHTTPWithHeader'
+)
+
+python_prepare_all() {
+       # unbundle htslib
+       export HTSLIB_MODE="external"
+       export HTSLIB_INCLUDE_DIR="${ESYSROOT}"/usr/include
+       export HTSLIB_LIBRARY_DIR="${ESYSROOT}"/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
+
+       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
+       # need to avoid dropping .so plugins into
+       # build-lib, which breaks tests
+       esetup.py build_ext --inplace -j1
+       distutils-r1_python_compile -j1
+}

Reply via email to