2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, logutils
|
2023-03-15 16:39:30 +00:00
|
|
|
, mako
|
2020-09-25 04:45:31 +00:00
|
|
|
, webtest
|
2022-01-13 20:06:32 +00:00
|
|
|
, pythonOlder
|
2020-09-25 04:45:31 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, genshi
|
|
|
|
, gunicorn
|
|
|
|
, jinja2
|
2022-01-13 20:06:32 +00:00
|
|
|
, six
|
2020-09-25 04:45:31 +00:00
|
|
|
, sqlalchemy
|
|
|
|
, virtualenv
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pecan";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "1.4.2";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-SbJV5wHD8UYWBfWw6PVPDCGSLXhF1BTCTdZAn+aV1VA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
logutils
|
2023-03-15 16:39:30 +00:00
|
|
|
mako
|
2020-09-25 04:45:31 +00:00
|
|
|
webtest
|
2022-01-13 20:06:32 +00:00
|
|
|
six
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-09-25 04:45:31 +00:00
|
|
|
pytestCheckHook
|
|
|
|
genshi
|
|
|
|
gunicorn
|
|
|
|
jinja2
|
|
|
|
sqlalchemy
|
|
|
|
virtualenv
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
pytestFlagsArray = [
|
2022-01-13 20:06:32 +00:00
|
|
|
"--pyargs pecan"
|
2023-03-15 16:39:30 +00:00
|
|
|
# tests fail with sqlalchemy 2.0
|
|
|
|
] ++ lib.optionals (lib.versionAtLeast sqlalchemy.version "2.0") [
|
|
|
|
# The 'sqlalchemy.orm.mapper()' function is removed as of SQLAlchemy
|
|
|
|
# 2.0. Use the 'sqlalchemy.orm.registry.map_imperatively()` method
|
|
|
|
# of the ``sqlalchemy.orm.registry`` class to perform classical
|
|
|
|
# mapping.
|
|
|
|
# https://github.com/pecan/pecan/issues/143
|
|
|
|
"--deselect=pecan/tests/test_jsonify.py::TestJsonifySQLAlchemyGenericEncoder::test_result_proxy"
|
|
|
|
"--deselect=pecan/tests/test_jsonify.py::TestJsonifySQLAlchemyGenericEncoder::test_row_proxy"
|
|
|
|
"--deselect=pecan/tests/test_jsonify.py::TestJsonifySQLAlchemyGenericEncoder::test_sa_object"
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pecan"
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
changelog = "https://pecan.readthedocs.io/en/latest/changes.html";
|
2022-01-13 20:06:32 +00:00
|
|
|
description = "WSGI object-dispatching web framework";
|
|
|
|
homepage = "https://www.pecanpy.org/";
|
|
|
|
license = licenses.bsd3;
|
2021-06-28 23:13:55 +00:00
|
|
|
maintainers = with maintainers; [ applePrincess ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|