1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 setuptools,
7 numpy,
8}:
9
10buildPythonPackage rec {
11 pname = "biopython";
12 version = "1.83";
13 pyproject = true;
14
15 disabled = pythonOlder "3.9";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-eOa/t43mMDQDev01/nfLbgqeW2Jwa+z3in2SKxbtg/c=";
20 };
21
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
28 build-system = [ setuptools ];
29
30 dependencies = [ numpy ];
31
32 pythonImportsCheck = [ "Bio" ];
33
34 checkPhase = ''
35 runHook preCheck
36
37 export HOME=$(mktemp -d)
38 cd Tests
39 python run_tests.py --offline
40
41 runHook postCheck
42 '';
43
44 meta = {
45 description = "Python library for bioinformatics";
46 longDescription = ''
47 Biopython is a set of freely available tools for biological computation
48 written in Python by an international team of developers. It is a
49 distributed collaborative effort to develop Python libraries and
50 applications which address the needs of current and future work in
51 bioinformatics.
52 '';
53 homepage = "https://biopython.org/wiki/Documentation";
54 maintainers = with lib.maintainers; [ luispedro ];
55 license = lib.licenses.bsd3;
56 };
57}