2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
2024-04-21 15:54:59 +00:00
|
|
|
, fetchpatch2
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
# build-system
|
2023-11-16 04:20:00 +00:00
|
|
|
, flit-core
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, markupsafe
|
|
|
|
|
|
|
|
# optional-dependencies
|
2021-06-28 23:13:55 +00:00
|
|
|
, watchdog
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, cryptography
|
2022-04-27 09:35:20 +00:00
|
|
|
, ephemeral-port-reserve
|
2024-02-29 20:09:43 +00:00
|
|
|
, greenlet
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest-timeout
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytest-xprocess
|
|
|
|
, pytestCheckHook
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
# reverse dependencies
|
|
|
|
, moto
|
|
|
|
, sentry-sdk
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "werkzeug";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "3.0.1";
|
2023-11-16 04:20:00 +00:00
|
|
|
format = "pyproject";
|
2021-12-26 17:43:05 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2023-11-16 04:20:00 +00:00
|
|
|
inherit pname version;
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-UH6BHs6nKxikBJR63tSzOQ4duPgmtJTXZVDvRbs7Hcw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch2 {
|
|
|
|
name = "werkzeug-pytest8-compat.patch";
|
|
|
|
url = "https://github.com/pallets/werkzeug/commit/4e5bdca7f8227d10cae828f8064fb98190ace4aa.patch";
|
|
|
|
hash = "sha256-lVknzvC+HIM6TagpyIOhnb+7tx0UXuGw0tINjsujISI=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
];
|
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
markupsafe
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
watchdog = lib.optionals (!stdenv.isDarwin) [
|
2024-02-29 20:09:43 +00:00
|
|
|
# watchdog requires macos-sdk 10.13
|
2023-11-16 04:20:00 +00:00
|
|
|
watchdog
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
cryptography
|
2022-04-27 09:35:20 +00:00
|
|
|
ephemeral-port-reserve
|
2021-06-28 23:13:55 +00:00
|
|
|
pytest-timeout
|
|
|
|
pytest-xprocess
|
|
|
|
pytestCheckHook
|
2024-02-29 20:09:43 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
greenlet
|
2023-11-16 04:20:00 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
2020-08-20 17:08:02 +00:00
|
|
|
"test_get_machine_id"
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# ConnectionRefusedError: [Errno 111] Connection refused
|
|
|
|
"tests/test_serving.py"
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# don't run tests that are marked with filterwarnings, they fail with
|
|
|
|
# warnings._OptionError: unknown warning category: 'pytest.PytestUnraisableExceptionWarning'
|
|
|
|
"-m 'not filterwarnings'"
|
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit moto sentry-sdk;
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://werkzeug.palletsprojects.com/en/${versions.majorMinor version}.x/changes/#version-${replaceStrings [ "." ] [ "-" ] version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://palletsprojects.com/p/werkzeug/";
|
2021-06-28 23:13:55 +00:00
|
|
|
description = "The comprehensive WSGI web application library";
|
|
|
|
longDescription = ''
|
|
|
|
Werkzeug is a comprehensive WSGI web application library. It
|
|
|
|
began as a simple collection of various utilities for WSGI
|
|
|
|
applications and has become one of the most advanced WSGI
|
|
|
|
utility libraries.
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|