1{ lib 2, stdenv 3, buildPythonPackage 4, pythonOlder 5, fetchPypi 6, watchdog 7, dataclasses 8, ephemeral-port-reserve 9, pytest-timeout 10, pytest-xprocess 11, pytestCheckHook 12, markupsafe 13# for passthru.tests 14, moto, sentry-sdk 15}: 16 17buildPythonPackage rec { 18 pname = "werkzeug"; 19 version = "2.2.2"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchPypi { 25 pname = "Werkzeug"; 26 inherit version; 27 sha256 = "sha256-fqLUgyLMfA+LOiFe1z6r17XXXQtQ4xqwBihsz/ngC48="; 28 }; 29 30 propagatedBuildInputs = [ 31 markupsafe 32 ] ++ lib.optionals (!stdenv.isDarwin) [ 33 # watchdog requires macos-sdk 10.13+ 34 watchdog 35 ] ++ lib.optionals (pythonOlder "3.7") [ 36 dataclasses 37 ]; 38 39 checkInputs = [ 40 ephemeral-port-reserve 41 pytest-timeout 42 pytest-xprocess 43 pytestCheckHook 44 ]; 45 46 disabledTests = lib.optionals stdenv.isDarwin [ 47 "test_get_machine_id" 48 ]; 49 50 disabledTestPaths = [ 51 # ConnectionRefusedError: [Errno 111] Connection refused 52 "tests/test_serving.py" 53 ]; 54 55 pytestFlagsArray = [ 56 # don't run tests that are marked with filterwarnings, they fail with 57 # warnings._OptionError: unknown warning category: 'pytest.PytestUnraisableExceptionWarning' 58 "-m 'not filterwarnings'" 59 ]; 60 61 passthru.tests = { 62 inherit moto sentry-sdk; 63 }; 64 65 meta = with lib; { 66 homepage = "https://palletsprojects.com/p/werkzeug/"; 67 description = "The comprehensive WSGI web application library"; 68 longDescription = '' 69 Werkzeug is a comprehensive WSGI web application library. It 70 began as a simple collection of various utilities for WSGI 71 applications and has become one of the most advanced WSGI 72 utility libraries. 73 ''; 74 license = licenses.bsd3; 75 maintainers = with maintainers; [ SuperSandro2000 ]; 76 }; 77}