summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-04-10 00:05:20 +0200
committerDavid Seifert <soap@gentoo.org>2016-04-10 00:06:07 +0200
commite2ab268997d872b610d931593db890f6c4dc4630 (patch)
treee6847a4184643b5c77a74e3c34952d4ba6fbd337 /sci-biology/pysam
parentwww-client/vivaldi: Old. (diff)
downloadgentoo-e2ab268997d872b610d931593db890f6c4dc4630.tar.gz
gentoo-e2ab268997d872b610d931593db890f6c4dc4630.tar.bz2
gentoo-e2ab268997d872b610d931593db890f6c4dc4630.zip
sci-biology/pysam: Version bump, add py3 support
Package-Manager: portage-2.2.28
Diffstat (limited to 'sci-biology/pysam')
-rw-r--r--sci-biology/pysam/Manifest1
-rw-r--r--sci-biology/pysam/files/pysam-0.9.0-missing-config.h.patch40
-rw-r--r--sci-biology/pysam/pysam-0.9.0.ebuild46
3 files changed, 87 insertions, 0 deletions
diff --git a/sci-biology/pysam/Manifest b/sci-biology/pysam/Manifest
index 4aea08f2d664..b7281dbe9115 100644
--- a/sci-biology/pysam/Manifest
+++ b/sci-biology/pysam/Manifest
@@ -1 +1,2 @@
DIST pysam-0.6.tar.gz 841790 SHA256 081c980481f31a81acb06f6fa5638b899321eddfd9eeb5075393e4dad84a1fc8 SHA512 b60df4551600f04e8ae67aec0f2745846d2411e2a1cc4c874ef296ee80ab075256190ebb0ec64eb78231d4d7b59670c5259818cd315f52c923774cc4c0b8b391 WHIRLPOOL eddeb19f3ebf0c6326f7c1b6b7224b2b8cb708e0bf7ceb66b1cac18909abafd1704b264452b70ee6721af4b3b360b51285dcffd7f137c6128920f91dc0dec7b2
+DIST pysam-0.9.0.tar.gz 2701721 SHA256 dd4946c8efa6786a754e2b50c6027dd03aa82c8ee6c2be3b4e51384da80b4c7c SHA512 9189ef2b56df0f5e2c84586c0c2b2cd46a77dbedd3aa6fd25ddcc4a93320038bead073206fff528ae9775f153c875838726dd0af8e4c7bf4e0c6063145e2bc06 WHIRLPOOL 6c7d459057fed3961e983b3e8563e10a47cb87f5da2fb99ca893eff9e19a8b9e4c27b5d82a978a611d615eba8052fbe3e36498ea461e03521a075d9aee8da463
diff --git a/sci-biology/pysam/files/pysam-0.9.0-missing-config.h.patch b/sci-biology/pysam/files/pysam-0.9.0-missing-config.h.patch
new file mode 100644
index 000000000000..617786a5a586
--- /dev/null
+++ b/sci-biology/pysam/files/pysam-0.9.0-missing-config.h.patch
@@ -0,0 +1,40 @@
+From 55f5d8ce51ad999123a779f31fcf0fecd60de9e6 Mon Sep 17 00:00:00 2001
+From: Andreas Heger <andreas.heger@gmail.com>
+Date: Mon, 21 Mar 2016 21:10:04 +0000
+Subject: [PATCH] {AH} create empty config.h for samtools if it does not exist,
+ fixes #245
+
+---
+ setup.py | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 7b59b69..2f00c37 100644
+--- a/setup.py
++++ b/setup.py
+@@ -155,7 +155,7 @@ def run_configure(option):
+ outf.write(
+ "/* empty config.h created by pysam */\n")
+ outf.write(
+- "/* conservative compilation options */")
++ "/* conservative compilation options */\n")
+
+ if HTSLIB_LIBRARY_DIR:
+ # linking against a shared, externally installed htslib version, no
+@@ -259,6 +259,16 @@ def run_configure(option):
+ "adding shared libcurl and libcrypto")
+ external_htslib_libraries.extend(["curl", "crypto"])
+
++# create empty config.h files if they have not been created automatically
++# or created by the user:
++for fn in "samtools/config.h", "htslib/config.h":
++ if not os.path.exists(fn):
++ with open(fn, "w") as outf:
++ outf.write(
++ "/* empty config.h created by pysam */\n")
++ outf.write(
++ "/* conservative compilation options */\n")
++
+ parts = ["samtools",
+ "bcftools",
+ "htslib",
diff --git a/sci-biology/pysam/pysam-0.9.0.ebuild b/sci-biology/pysam/pysam-0.9.0.ebuild
new file mode 100644
index 000000000000..5fcecfb99db9
--- /dev/null
+++ b/sci-biology/pysam/pysam-0.9.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
+
+inherit distutils-r1 python-r1
+
+DESCRIPTION="Python interface for the SAM/BAM sequence alignment and mapping format"
+HOMEPAGE="https://github.com/pysam-developers/pysam http://pypi.python.org/pypi/pysam"
+SRC_URI="https://github.com/pysam-developers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="=sci-libs/htslib-1.3*"
+DEPEND="${RDEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}/${P}-missing-config.h.patch"
+)
+
+src_prepare() {
+ default
+
+ export HTSLIB_INCLUDE_DIR=${EPREFIX}/usr/include
+ export HTSLIB_LIBRARY_DIR=${EPREFIX}/usr/$(get_libdir)
+ export HTSLIB_CONFIGURE_OPTIONS="--disable-libcurl"
+
+ sed -e "/ext\.extra_link_args += \['-Wl,-rpath,\$ORIGIN'\]/d" \
+ -i cy_build.py || die
+ sed -e '/runtime_library_dirs=htslib_library_dirs/d' \
+ -i setup.py || die
+}
+
+src_compile() {
+ # TODO
+ # empty compile, as the build system runs the whole build again in install
+ :
+}