Skip to content

Commit 14353fc

Browse files
authored
python3Packages.biopython: revert update 1.83 -> 1.84 (#354437)
2 parents 73794b4 + 95aa3d1 commit 14353fc

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/Bio/SeqIO/SeqXmlIO.py b/Bio/SeqIO/SeqXmlIO.py
2+
index 8fe75ebb728..6758317d05f 100644
3+
--- a/Bio/SeqIO/SeqXmlIO.py
4+
+++ b/Bio/SeqIO/SeqXmlIO.py
5+
@@ -498,11 +498,12 @@ def iterate(self, handle):
6+
if not text:
7+
break
8+
parser.feed(text)
9+
+ # Closing the parser ensures that all XML data fed into it are processed
10+
+ parser.close()
11+
# We have reached the end of the XML file;
12+
# send out the remaining records
13+
yield from records
14+
records.clear()
15+
- parser.close()
16+
17+
18+
class SeqXmlWriter(SequenceWriter):

pkgs/development/python-modules/biopython/default.nix

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
{
22
lib,
33
buildPythonPackage,
4-
fetchFromGitHub,
4+
fetchPypi,
55
pythonOlder,
66
setuptools,
77
numpy,
88
}:
99

1010
buildPythonPackage rec {
1111
pname = "biopython";
12-
version = "1.84";
12+
version = "1.83";
1313
pyproject = true;
1414

1515
disabled = pythonOlder "3.9";
1616

17-
src = fetchFromGitHub {
18-
owner = "biopython";
19-
repo = "biopython";
20-
rev = "refs/tags/biopython-${lib.replaceStrings [ "." ] [ "" ] version}";
21-
hash = "sha256-zXUB/AkWc/cY9M02WheSvXjT/nwM+lGXfXgCcWfu0G4=";
17+
src = fetchPypi {
18+
inherit pname version;
19+
hash = "sha256-eOa/t43mMDQDev01/nfLbgqeW2Jwa+z3in2SKxbtg/c=";
2220
};
2321

22+
patches = [
23+
# cherry-picked from https://github.com/biopython/biopython/commit/3f9bda7ef44f533dadbaa0de29ac21929bc0b2f1
24+
# fixes SeqXMLIO parser to process all data. remove on next update
25+
./close_parser_on_time.patch
26+
];
27+
2428
build-system = [ setuptools ];
2529

2630
dependencies = [ numpy ];

0 commit comments

Comments
 (0)