sci-biology/tophat: Unbundle python modules
authorDavid Seifert <soap@gentoo.org>
Sat, 1 Apr 2017 12:09:16 +0000 (14:09 +0200)
committerDavid Seifert <soap@gentoo.org>
Sat, 1 Apr 2017 12:09:58 +0000 (14:09 +0200)
Bug: https://bugs.gentoo.org/show_bug.cgi?id=614370
Package-Manager: Portage-2.3.5, Repoman-2.3.2

sci-biology/tophat/files/tophat-2.1.1-python2-shebangs.patch [new file with mode: 0644]
sci-biology/tophat/tophat-2.1.1-r4.ebuild [moved from sci-biology/tophat/tophat-2.1.1-r3.ebuild with 81% similarity]

diff --git a/sci-biology/tophat/files/tophat-2.1.1-python2-shebangs.patch b/sci-biology/tophat/files/tophat-2.1.1-python2-shebangs.patch
new file mode 100644 (file)
index 0000000..5c38bcc
--- /dev/null
@@ -0,0 +1,42 @@
+Make Python 2 explicit in python scripts
+
+--- a/src/bed_to_juncs
++++ b/src/bed_to_juncs
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # encoding: utf-8
+ """
+ bed_to_juncs.py
+--- a/src/contig_to_chr_coords
++++ b/src/contig_to_chr_coords
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # encoding: utf-8
+ """
+ contig_to_chr_coords.py
+--- a/src/sra_to_solid
++++ b/src/sra_to_solid
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ """
+ sra_to_solid.py
+--- a/src/tophat-fusion-post
++++ b/src/tophat-fusion-post
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ """
+--- a/src/tophat.py
++++ b/src/tophat.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # encoding: utf-8
+ """
similarity index 81%
rename from sci-biology/tophat/tophat-2.1.1-r3.ebuild
rename to sci-biology/tophat/tophat-2.1.1-r4.ebuild
index cf684593109e94aa2daaf5378c1f871b0119ffce..590f6eb2d20f0207a72718dd145796a47f5252dc 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -19,6 +19,8 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="${PYTHON_DEPS}
        dev-libs/boost:=[threads]
+       dev-python/intervaltree[${PYTHON_USEDEP}]
+       dev-python/sortedcontainers[${PYTHON_USEDEP}]
        sci-biology/samtools:0.1-legacy
        sci-biology/bowtie:2"
 DEPEND="${RDEPEND}
@@ -27,8 +29,9 @@ DEPEND="${RDEPEND}
        >=sys-devel/autoconf-archive-2016.09.16"
 
 PATCHES=(
-       "${FILESDIR}/${P}-unbundle-seqan-samtools.patch"
-       "${FILESDIR}/${P}-fix-c++14.patch"
+       "${FILESDIR}"/${P}-unbundle-seqan-samtools.patch
+       "${FILESDIR}"/${P}-fix-c++14.patch
+       "${FILESDIR}"/${P}-python2-shebangs.patch
 )
 
 src_prepare() {
@@ -66,16 +69,10 @@ src_configure() {
 src_install() {
        default
 
+       # delete bundled python modules
        local i
-       # install scripts properly
-       for i in bed_to_juncs contig_to_chr_coords sra_to_solid tophat tophat-fusion-post; do
-               python_fix_shebang "${ED%/}/usr/bin/${i}"
-       done
-
-       # install python modules properly
        for i in intervaltree sortedcontainers; do
-               python_domodule "${ED%/}/usr/bin/${i}"
-               rm -rf "${ED%/}/usr/bin/${i}" || die
+               rm -r "${ED%/}"/usr/bin/${i} || die
        done
 }