1{ lib
2, stdenv
3, buildPythonPackage
4, pythonOlder
5, fetchPypi
6, watchdog
7, dataclasses
8, pytest-timeout
9, pytest-xprocess
10, pytestCheckHook
11}:
12
13buildPythonPackage rec {
14 pname = "werkzeug";
15 version = "2.0.1";
16 disabled = pythonOlder "3.6";
17
18 src = fetchPypi {
19 pname = "Werkzeug";
20 inherit version;
21 sha256 = "0hlwawnn8c41f254qify5jnjj8xb97n294h09bqimzqhs0qdpq8x";
22 };
23
24 propagatedBuildInputs = lib.optionals (!stdenv.isDarwin) [
25 # watchdog requires macos-sdk 10.13+
26 watchdog
27 ] ++ lib.optionals (pythonOlder "3.7") [
28 dataclasses
29 ];
30
31 checkInputs = [
32 pytest-timeout
33 pytest-xprocess
34 pytestCheckHook
35 ];
36
37 disabledTests = lib.optionals stdenv.isDarwin [
38 "test_get_machine_id"
39 ];
40
41 pytestFlagsArray = [
42 # don't run tests that are marked with filterwarnings, they fail with
43 # warnings._OptionError: unknown warning category: 'pytest.PytestUnraisableExceptionWarning'
44 "-m 'not filterwarnings'"
45 ];
46
47 meta = with lib; {
48 homepage = "https://palletsprojects.com/p/werkzeug/";
49 description = "The comprehensive WSGI web application library";
50 longDescription = ''
51 Werkzeug is a comprehensive WSGI web application library. It
52 began as a simple collection of various utilities for WSGI
53 applications and has become one of the most advanced WSGI
54 utility libraries.
55 '';
56 license = licenses.bsd3;
57 };
58}