commit:     d16351c8ea24af193b4fa3f7cd9321924ceffc40
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  1 12:09:16 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Apr  1 12:09:58 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d16351c8

sci-biology/tophat: Unbundle python modules

Bug: https://bugs.gentoo.org/show_bug.cgi?id=614370
Package-Manager: Portage-2.3.5, Repoman-2.3.2

 .../files/tophat-2.1.1-python2-shebangs.patch      | 42 ++++++++++++++++++++++
 ...phat-2.1.1-r3.ebuild => tophat-2.1.1-r4.ebuild} | 19 +++++-----
 2 files changed, 50 insertions(+), 11 deletions(-)

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
index 00000000000..5c38bcc072e
--- /dev/null
+++ b/sci-biology/tophat/files/tophat-2.1.1-python2-shebangs.patch
@@ -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
+ """

diff --git a/sci-biology/tophat/tophat-2.1.1-r3.ebuild 
b/sci-biology/tophat/tophat-2.1.1-r4.ebuild
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 cf684593109..590f6eb2d20 100644
--- a/sci-biology/tophat/tophat-2.1.1-r3.ebuild
+++ b/sci-biology/tophat/tophat-2.1.1-r4.ebuild
@@ -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
 }
 

Reply via email to