1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 pytestCheckHook,
7 cffi,
8 lmdb,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "lmdb";
14 version = "1.6.2";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-0o4/pZk1/2iIWHYOxS8gLsuMEImj9o0fFi6jB40VHnM=";
22 };
23
24 build-system = [ setuptools ];
25
26 buildInputs = [ lmdb ];
27
28 pythonImportsCheck = [ "lmdb" ];
29
30 nativeCheckInputs = [
31 cffi
32 pytestCheckHook
33 ];
34
35 LMDB_FORCE_SYSTEM = 1;
36
37 meta = {
38 description = "Universal Python binding for the LMDB 'Lightning' Database";
39 homepage = "https://github.com/dw/py-lmdb";
40 changelog = "https://github.com/jnwatson/py-lmdb/blob/py-lmdb_${version}/ChangeLog";
41 license = lib.licenses.openldap;
42 maintainers = with lib.maintainers; [
43 ivan
44 ];
45 };
46}