From: "Pacho Ramos" <pacho@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-biology/biopython/files/, sci-biology/biopython/
Date: Fri, 21 Jul 2023 08:55:08 +0000 (UTC) [thread overview]
Message-ID: <1689929703.7dabbaaa3f7252e981fe1774c858a79c6ee9be0b.pacho@gentoo> (raw)
commit: 7dabbaaa3f7252e981fe1774c858a79c6ee9be0b
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 21 08:53:13 2023 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Fri Jul 21 08:55:03 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dabbaaa
sci-biology/biopython: use PEP517 build
Also apply Fedora patches to get ready for newer reportlab and python3.12
Closes: https://bugs.gentoo.org/910016
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
sci-biology/biopython/biopython-1.81-r1.ebuild | 59 ++++++++++++++++++++++
.../files/biopython-1.81-python3.12.patch | 11 ++++
.../files/biopython-1.81-reportlab4.patch | 29 +++++++++++
3 files changed, 99 insertions(+)
diff --git a/sci-biology/biopython/biopython-1.81-r1.ebuild b/sci-biology/biopython/biopython-1.81-r1.ebuild
new file mode 100644
index 000000000000..115a4d3b1a4c
--- /dev/null
+++ b/sci-biology/biopython/biopython-1.81-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_USE_PEP517="setuptools"
+DISTUTILS_EXT=1
+
+inherit distutils-r1 optfeature pypi
+
+DESCRIPTION="Python modules for computational molecular biology"
+HOMEPAGE="https://www.biopython.org/ https://pypi.org/project/biopython/"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ dev-python/networkx[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/rdflib[${PYTHON_USEDEP}]
+ dev-python/pygraphviz[${PYTHON_USEDEP}]
+ >=dev-python/reportlab-3.5.13-r1[${PYTHON_USEDEP}]
+ dev-python/pydot[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+BDEPEND="sys-devel/flex"
+
+DOCS=( {CONTRIB,DEPRECATED,NEWS,README}.rst Doc/. )
+
+PATCHES=(
+ "${FILESDIR}/${P}-reportlab4.patch"
+ "${FILESDIR}/${P}-python3.12.patch"
+)
+
+python_test() {
+ cd Tests || die
+ "${EPYTHON}" run_tests.py --offline --verbose || die
+}
+
+python_install_all() {
+ # remove files causing ecompressdir to fail
+ rm Doc/examples/ls_orchid.gbk.{gz,bz2} || die
+
+ distutils-r1_python_install_all
+
+ dodir /usr/share/${PN}
+ cp -r --preserve=mode Scripts Tests "${ED}"/usr/share/${PN} || die
+}
+
+pkg_postinst() {
+ optfeature_header "For database support you need to install:"
+ optfeature "MySQL database support" dev-python/mysqlclient
+ optfeature "PostgreSQL database support" dev-python/psycopg:2
+
+ optfeature_header "Some applications need extra packages:"
+ optfeature "EMBOSS (The European Molecular Biology Open Software Suite)" sci-biology/emboss
+}
diff --git a/sci-biology/biopython/files/biopython-1.81-python3.12.patch b/sci-biology/biopython/files/biopython-1.81-python3.12.patch
new file mode 100644
index 000000000000..8f903a4a39bd
--- /dev/null
+++ b/sci-biology/biopython/files/biopython-1.81-python3.12.patch
@@ -0,0 +1,11 @@
+--- a/Tests/test_Entrez.orig.py 2023-02-13 04:07:42.000000000 +0100
++++ b/Tests/test_Entrez.py 2023-06-30 14:42:58.177365639 +0200
+@@ -126,7 +126,7 @@
+ :type params: dict
+ :param expected: Expected set of IDs, as colleciton of strings.
+ """
+- testcase.assertEquals(len(params["id"]), 1)
++ testcase.assertEqual(len(params["id"]), 1)
+ ids_str = params["id"][0]
+ # Compare up to ordering
+ testcase.assertCountEqual(ids_str.split(","), expected)
diff --git a/sci-biology/biopython/files/biopython-1.81-reportlab4.patch b/sci-biology/biopython/files/biopython-1.81-reportlab4.patch
new file mode 100644
index 000000000000..ef1994553614
--- /dev/null
+++ b/sci-biology/biopython/files/biopython-1.81-reportlab4.patch
@@ -0,0 +1,29 @@
+From 74fdf49ade95157c3c4b23a95831925be4899223 Mon Sep 17 00:00:00 2001
+From: Peter Cock <p.j.a.cock@googlemail.com>
+Date: Mon, 5 Jun 2023 12:39:59 +0100
+Subject: [PATCH] Skip if ReportLab bitmap output module missing
+
+Would like to skip this earlier, but not so
+easy in ReportLab v4 with a choice of backends
+---
+ Tests/test_GraphicsBitmaps.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/Tests/test_GraphicsBitmaps.py b/Tests/test_GraphicsBitmaps.py
+index 2ffdfb3dd71..76615a2fd1d 100644
+--- a/Tests/test_GraphicsBitmaps.py
++++ b/Tests/test_GraphicsBitmaps.py
+@@ -111,9 +111,12 @@ def real_test():
+ "Check the fonts needed by ReportLab if you want "
+ "bitmaps from Bio.Graphics\n" + str(err)
+ ) from None
++ elif str(err).startswith("cannot import desired renderPM backend rlPyCairo"):
++ raise MissingExternalDependencyError(
++ "Reportlab module rlPyCairo unavailable\n" + str(err)
++ ) from None
+ else:
+ raise
+-
+ return True
+
+
next reply other threads:[~2023-07-21 8:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-21 8:55 Pacho Ramos [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-01-02 22:09 [gentoo-commits] repo/gentoo:master commit in: sci-biology/biopython/files/, sci-biology/biopython/ Justin Lecher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1689929703.7dabbaaa3f7252e981fe1774c858a79c6ee9be0b.pacho@gentoo \
--to=pacho@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox