summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2024-05-24 11:53:59 +0200
committerDavid Seifert <soap@gentoo.org>2024-05-24 11:53:59 +0200
commitbaa67260b08ba489b0790e989e04dd1eb7f54c55 (patch)
tree681c5ff8fa768bd5e21b1a4e3fc3275e9f537712
parentnet-vpn/i2p: restrict to >=virtual/jdk-11:* for #932030 (diff)
downloadgentoo-baa67260b08ba489b0790e989e04dd1eb7f54c55.tar.gz
gentoo-baa67260b08ba489b0790e989e04dd1eb7f54c55.tar.bz2
gentoo-baa67260b08ba489b0790e989e04dd1eb7f54c55.zip
sci-biology/pysam: add 0.22.1
Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--sci-biology/pysam/Manifest1
-rw-r--r--sci-biology/pysam/pysam-0.22.1.ebuild68
2 files changed, 69 insertions, 0 deletions
diff --git a/sci-biology/pysam/Manifest b/sci-biology/pysam/Manifest
index 2bc79f89f441..fae7b9793388 100644
--- a/sci-biology/pysam/Manifest
+++ b/sci-biology/pysam/Manifest
@@ -1 +1,2 @@
DIST pysam-0.21.0.gh.tar.gz 3842829 BLAKE2B 83db290ec0bae71106276ed4f1721292c0d2fa55053c7451f0a8a79619b1c4d8444b99293ac5d8051bfb0b59e984e32a89798bab091e3a019b7c2a3fb7414d1c SHA512 b2ac986b6a352df1d2066a224d710648a88d8ad44273623a89ae0f4bb2645b00f0d0e1685c8ccedfd379259255957e653f3c3199621ac1d4c26098f538b6bfa7
+DIST pysam-0.22.1.gh.tar.gz 3885851 BLAKE2B 6f83c445c7e63e28823f443b0f106726303b0609f4040e9dca930c820d48c2adfe13d33ecffb514ce75c3b03968af050652689a0be39aaabca1af546e9188480 SHA512 fb8dc7c4a6ae908d8d409789f2706cce589d4b6a1057bcc4043f8a26a5b390f79d30d1a1cbe69cbf370caabf261ed8367685393240765080e94f1782ed7f0350
diff --git a/sci-biology/pysam/pysam-0.22.1.ebuild b/sci-biology/pysam/pysam-0.22.1.ebuild
new file mode 100644
index 000000000000..9070476873e1
--- /dev/null
+++ b/sci-biology/pysam/pysam-0.22.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+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.20*:="
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+BDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ test? (
+ =sci-biology/bcftools-1.20*
+ =sci-biology/samtools-1.20*
+ )"
+
+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'
+
+ 'tests/AlignedSegment_test.py::TestBaseModifications'
+)
+
+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
+}