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