1{ lib
2, fetchPypi
3, buildPythonPackage
4, persistent
5, zope_interface
6, transaction
7, zope_testrunner
8, python
9, pythonOlder
10}:
11
12buildPythonPackage rec {
13 pname = "btrees";
14 version = "5.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 pname = "BTrees";
21 inherit version;
22 hash = "sha256-raDzHpMloEeV0dJOAn7ZsrZdpNZqz/i4eVWzUo1/w2k=";
23 };
24
25 propagatedBuildInputs = [
26 persistent
27 zope_interface
28 ];
29
30 nativeCheckInputs = [
31 transaction
32 zope_testrunner
33 ];
34
35 checkPhase = ''
36 runHook preCheck
37 ${python.interpreter} -m zope.testrunner --test-path=src --auto-color --auto-progress
38 runHook postCheck
39 '';
40
41 pythonImportsCheck = [
42 "BTrees.OOBTree"
43 "BTrees.IOBTree"
44 "BTrees.IIBTree"
45 "BTrees.IFBTree"
46 ];
47
48 meta = with lib; {
49 description = "Scalable persistent components";
50 homepage = "http://packages.python.org/BTrees";
51 license = licenses.zpl21;
52 maintainers = with maintainers; [ ];
53 };
54}