2021-12-26 17:43:05 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, sqlite
|
|
|
|
, isPyPy
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "apsw";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "3.37.0-r1";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = isPyPy;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rogerbinns";
|
|
|
|
repo = "apsw";
|
|
|
|
rev = version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "0p6rlbk7p6hj5mbmk1a8phazw3ym6hf5103zkxzg4p1jgjgi0xpl";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
buildInputs = [
|
|
|
|
sqlite
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"testCursor"
|
|
|
|
"testLoadExtension"
|
|
|
|
"testShell"
|
|
|
|
"testVFS"
|
|
|
|
"testVFSWithWAL"
|
|
|
|
"testdb"
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
# This is https://github.com/rogerbinns/apsw/issues/277 but
|
|
|
|
# because we use pytestCheckHook we need to blacklist the test
|
|
|
|
# manually
|
|
|
|
"testzzForkChecker"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"apsw"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A Python wrapper for the SQLite embedded relational database engine";
|
|
|
|
homepage = "https://github.com/rogerbinns/apsw";
|
|
|
|
license = licenses.zlib;
|
2021-12-26 17:43:05 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|