From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A15F915802F for ; Thu, 30 Mar 2023 11:11:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EDA47E0895; Thu, 30 Mar 2023 11:11:22 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D3AACE0895 for ; Thu, 30 Mar 2023 11:11:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E0519335D7B for ; Thu, 30 Mar 2023 11:11:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EDCB49ED for ; Thu, 30 Mar 2023 11:11:18 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1680174661.b29c8f32c0c043d2fcb82195fb58d00fcd771449.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-biology/pysam/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-biology/pysam/pysam-9999.ebuild X-VCS-Directories: sci-biology/pysam/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: b29c8f32c0c043d2fcb82195fb58d00fcd771449 X-VCS-Branch: master Date: Thu, 30 Mar 2023 11:11:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: af56bf0b-f05f-4aa8-9fc4-f33dc90baf4c X-Archives-Hash: 6bfac06454be9cd15650f124f68186cf commit: b29c8f32c0c043d2fcb82195fb58d00fcd771449 Author: David Seifert gentoo org> AuthorDate: Thu Mar 30 11:11:01 2023 +0000 Commit: David Seifert gentoo org> CommitDate: Thu Mar 30 11:11:01 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b29c8f32 sci-biology/pysam: add 9999 Signed-off-by: David Seifert gentoo.org> sci-biology/pysam/pysam-9999.ebuild | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/sci-biology/pysam/pysam-9999.ebuild b/sci-biology/pysam/pysam-9999.ebuild new file mode 100644 index 000000000000..a162ddf2158b --- /dev/null +++ b/sci-biology/pysam/pysam-9999.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) + +inherit distutils-r1 + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/pysam-developers/pysam.git" +else + SRC_URI="https://github.com/pysam-developers/pysam/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Python interface for the SAM/BAM sequence alignment and mapping format" +HOMEPAGE=" + https://github.com/pysam-developers/pysam + https://pypi.org/project/pysam/" + +LICENSE="MIT" +SLOT="0" + +RDEPEND=">=sci-libs/htslib-1.17" +DEPEND="${RDEPEND} + dev-python/cython[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}]" +BDEPEND=" + test? ( + >=sci-biology/bcftools-1.17 + >=sci-biology/samtools-1.17 + )" + +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 +}