2022-01-25 03:21:06 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-10-17 09:34:42 +00:00
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydal";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "20220916.1";
|
2022-01-25 03:21:06 +00:00
|
|
|
format = "setuptools";
|
2021-10-17 09:34:42 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-10-30 15:09:59 +00:00
|
|
|
sha256 = "sha256-GKnJ1aRLuJp+wQVjzL51o/KteGD5k4X221bDzpIiEEQ=";
|
2021-10-17 09:34:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# this test has issues with an import statement
|
|
|
|
# rm tests/tags.py
|
|
|
|
sed -i '/from .tags import/d' tests/__init__.py
|
|
|
|
|
|
|
|
# this assertion errors without obvious reason
|
|
|
|
sed -i '/self.assertEqual(csv0, str(r4))/d' tests/caching.py
|
|
|
|
|
|
|
|
# some sql tests fail against sqlite engine
|
|
|
|
sed -i '/from .sql import/d' tests/__init__.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pydal" ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} -m unittest tests
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2022-01-25 03:21:06 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python Database Abstraction Layer";
|
2021-10-17 09:34:42 +00:00
|
|
|
homepage = "https://github.com/web2py/pydal";
|
2022-01-25 03:21:06 +00:00
|
|
|
license = with licenses; [ bsd3 ] ;
|
|
|
|
maintainers = with maintainers; [ wamserma ];
|
2021-10-17 09:34:42 +00:00
|
|
|
};
|
|
|
|
}
|