Gentoo Archives: gentoo-commits

From: Marius Brehler <marbre@××××××××××××××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/biopython/files/, sci-biology/biopython/
Date: Wed, 12 Oct 2016 06:30:51
Message-Id: 1474758170.df096482743b6bfa2598cc52bbb95117952f3b24.marbre@gentoo
1 commit: df096482743b6bfa2598cc52bbb95117952f3b24
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 24 23:02:02 2016 +0000
4 Commit: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
5 CommitDate: Sat Sep 24 23:02:50 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=df096482
7
8 sci-biology/biopython: remove, in main tree
9
10 sci-biology/biopython/biopython-1.67-r1.ebuild | 60 ---------------
11 .../biopython/files/biopython-1.67-pull-884.patch | 87 ----------------------
12 sci-biology/biopython/metadata.xml | 8 --
13 3 files changed, 155 deletions(-)
14
15 diff --git a/sci-biology/biopython/biopython-1.67-r1.ebuild b/sci-biology/biopython/biopython-1.67-r1.ebuild
16 deleted file mode 100644
17 index 197e265..0000000
18 --- a/sci-biology/biopython/biopython-1.67-r1.ebuild
19 +++ /dev/null
20 @@ -1,60 +0,0 @@
21 -# Copyright 1999-2016 Gentoo Foundation
22 -# Distributed under the terms of the GNU General Public License v2
23 -# $Id$
24 -
25 -EAPI=5
26 -
27 -PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy )
28 -
29 -inherit distutils-r1 eutils
30 -
31 -DESCRIPTION="Python modules for computational molecular biology"
32 -HOMEPAGE="http://www.biopython.org/ https://pypi.python.org/pypi/biopython/"
33 -SRC_URI="http://www.biopython.org/DIST/${P}.tar.gz"
34 -
35 -LICENSE="HPND"
36 -SLOT="0"
37 -KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
38 -IUSE=""
39 -
40 -RDEPEND="
41 - dev-python/matplotlib[$(python_gen_usedep 'python*')]
42 - dev-python/networkx[$(python_gen_usedep 'python*')]
43 - dev-python/numpy[$(python_gen_usedep 'python*')]
44 - dev-python/rdflib[$(python_gen_usedep 'python*')]
45 - dev-python/pygraphviz[$(python_gen_usedep 'python2*')]
46 - dev-python/reportlab[$(python_gen_usedep 'python*')]
47 - media-gfx/pydot[$(python_gen_usedep 'python2*')]
48 - "
49 -DEPEND="${RDEPEND}
50 - sys-devel/flex"
51 -
52 -DOCS=( CONTRIB DEPRECATED NEWS README Doc/. )
53 -
54 -src_prepare(){
55 - epatch "${FILESDIR}"/biopython-1.67-pull-884.patch
56 -}
57 -
58 -python_test() {
59 - distutils_install_for_testing
60 - cp -r "${S}"/{Doc,Tests} "${TEST_DIR}"/lib/ || die
61 - cd "${TEST_DIR}"/lib/Tests || die
62 - rm ./test_BioSQL_psycopg2.py ./test_BioSQL_MySQLdb.py ./test_BioSQL_mysql_connector.py || die
63 - ${PYTHON} run_tests.py --offline --verbose || die
64 -}
65 -
66 -python_install_all() {
67 - distutils-r1_python_install_all
68 -
69 - dodir /usr/share/${PN}
70 - cp -r --preserve=mode Scripts Tests "${ED}"/usr/share/${PN} || die
71 -}
72 -
73 -pkg_postinst() {
74 - elog "For database support you need to install:"
75 - optfeature "MySQL" dev-python/mysql-python
76 - optfeature "PostGreSQL" dev-python/psycopg
77 - echo
78 - elog "Some applications need extra packages:"
79 - optfeature "EMBOSS (The European Molecular Biology Open Software Suite)" sci-biology/emboss
80 -}
81
82 diff --git a/sci-biology/biopython/files/biopython-1.67-pull-884.patch b/sci-biology/biopython/files/biopython-1.67-pull-884.patch
83 deleted file mode 100644
84 index f2a2537..0000000
85 --- a/sci-biology/biopython/files/biopython-1.67-pull-884.patch
86 +++ /dev/null
87 @@ -1,87 +0,0 @@
88 ---- Bio/SeqRecord.py.old 2016-06-08 15:27:00.000000000 +0200
89 -+++ Bio/SeqRecord.py 2016-07-22 17:48:19.620712535 +0200
90 -@@ -292,19 +292,28 @@
91 - >>> sub_record.letter_annotations = {}
92 - >>> sub_record.letter_annotations
93 - {}
94 -+
95 -+ Note that if replacing the record's sequence with a sequence of a
96 -+ different length you must first clear the letter_annotations dict.
97 - """)
98 -
99 - def _set_seq(self, value):
100 - # TODO - Add a deprecation warning that the seq should be write only?
101 - if self._per_letter_annotations:
102 -- # TODO - Make this a warning? Silently empty the dictionary?
103 -- raise ValueError("You must empty the letter annotations first!")
104 -- self._seq = value
105 -- try:
106 -- self._per_letter_annotations = _RestrictedDict(length=len(self.seq))
107 -- except AttributeError:
108 -- # e.g. seq is None
109 -- self._per_letter_annotations = _RestrictedDict(length=0)
110 -+ if len(self) != len(value):
111 -+ # TODO - Make this a warning? Silently empty the dictionary?
112 -+ raise ValueError("You must empty the letter annotations first!")
113 -+ else:
114 -+ # Leave the existing per letter annotations unchanged:
115 -+ self._seq = value
116 -+ else:
117 -+ self._seq = value
118 -+ # Reset the (empty) letter annotations dict with new length:
119 -+ try:
120 -+ self._per_letter_annotations = _RestrictedDict(length=len(self.seq))
121 -+ except AttributeError:
122 -+ # e.g. seq is None
123 -+ self._per_letter_annotations = _RestrictedDict(length=0)
124 -
125 - seq = property(fget=lambda self: self._seq,
126 - fset=_set_seq,
127 -@@ -427,10 +436,17 @@
128 - if self.seq is None:
129 - raise ValueError("If the sequence is None, we cannot slice it.")
130 - parent_length = len(self)
131 -- answer = self.__class__(self.seq[index],
132 -- id=self.id,
133 -- name=self.name,
134 -- description=self.description)
135 -+ from BioSQL.BioSeq import DBSeqRecord
136 -+ if isinstance(self, DBSeqRecord):
137 -+ answer = SeqRecord(self.seq[index],
138 -+ id=self.id,
139 -+ name=self.name,
140 -+ description=self.description)
141 -+ else:
142 -+ answer = self.__class__(self.seq[index],
143 -+ id=self.id,
144 -+ name=self.name,
145 -+ description=self.description)
146 - # TODO - The description may no longer apply.
147 - # It would be safer to change it to something
148 - # generic like "edited" or the default value.
149 ---- Tests/test_SeqRecord.py.old 2016-06-08 15:27:00.000000000 +0200
150 -+++ Tests/test_SeqRecord.py 2016-07-22 17:48:45.401428898 +0200
151 -@@ -72,6 +72,23 @@
152 - except (TypeError, ValueError) as e:
153 - pass
154 -
155 -+ def test_replacing_seq(self):
156 -+ """Replacing .seq if .letter_annotation present."""
157 -+ rec = SeqRecord(Seq("ACGT", generic_dna),
158 -+ id="Test", name="Test", description="Test",
159 -+ letter_annotations={"example": [1, 2, 3, 4]})
160 -+ try:
161 -+ rec.seq = Seq("ACGTACGT", generic_dna)
162 -+ self.fail("Changing .seq length with letter_annotations present should fail!")
163 -+ except ValueError as e:
164 -+ self.assertEqual(str(e), "You must empty the letter annotations first!")
165 -+ # Check we can replace IF the length is the same
166 -+ self.assertEqual(str(rec.seq), "ACGT")
167 -+ self.assertEqual(rec.letter_annotations, {"example": [1, 2, 3, 4]})
168 -+ rec.seq = Seq("NNNN" , generic_dna)
169 -+ self.assertEqual(str(rec.seq), "NNNN")
170 -+ self.assertEqual(rec.letter_annotations, {"example": [1, 2, 3, 4]})
171 -+
172 - def test_valid_id(self):
173 - with self.assertRaises(TypeError):
174 - SeqRecord(Seq("ACGT", generic_dna), id=dict())
175
176 diff --git a/sci-biology/biopython/metadata.xml b/sci-biology/biopython/metadata.xml
177 deleted file mode 100644
178 index 959160f..0000000
179 --- a/sci-biology/biopython/metadata.xml
180 +++ /dev/null
181 @@ -1,8 +0,0 @@
182 -<?xml version="1.0" encoding="UTF-8"?>
183 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
184 -<pkgmetadata>
185 - <maintainer type="project">
186 - <email>sci-biology@g.o</email>
187 - <name>Gentoo Biology Project</name>
188 - </maintainer>
189 -</pkgmetadata>