1{
2 stdenv,
3 lib,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pythonOlder,
7 pytestCheckHook,
8 setuptools,
9 sqlite,
10}:
11
12buildPythonPackage rec {
13 pname = "apsw";
14 version = "3.46.1.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "rogerbinns";
21 repo = "apsw";
22 tag = version;
23 hash = "sha256-/MMCwdd2juFbv/lrYwuO2mdWm0+v+YFn6h9CwdQMTpg=";
24 };
25
26 build-system = [ setuptools ];
27
28 buildInputs = [ sqlite ];
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 pytestFlagsArray = [ "apsw/tests.py" ];
33
34 disabledTests = [
35 # we don't build the test extension
36 "testLoadExtension"
37 "testShell"
38 "testVFS"
39 "testVFSWithWAL"
40 # no lines in errout.txt
41 "testWriteUnraisable"
42 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "testzzForkChecker" ];
43
44 pythonImportsCheck = [ "apsw" ];
45
46 meta = with lib; {
47 changelog = "https://github.com/rogerbinns/apsw/blob/${src.rev}/doc/changes.rst";
48 description = "Python wrapper for the SQLite embedded relational database engine";
49 homepage = "https://github.com/rogerbinns/apsw";
50 license = licenses.zlib;
51 maintainers = with maintainers; [ gador ];
52 };
53}