1{
2 lib,
3 stdenv,
4 aiohttp,
5 apache-beam,
6 asttokens,
7 blinker,
8 bottle,
9 buildPythonPackage,
10 celery,
11 certifi,
12 chalice,
13 django,
14 executing,
15 falcon,
16 fetchFromGitHub,
17 flask,
18 gevent,
19 httpx,
20 jsonschema,
21 mock,
22 pure-eval,
23 pyrsistent,
24 pyspark,
25 pysocks,
26 pytest-forked,
27 pytest-localserver,
28 pytest-watch,
29 pytestCheckHook,
30 pythonOlder,
31 quart,
32 rq,
33 sanic,
34 setuptools,
35 sqlalchemy,
36 tornado,
37 urllib3,
38}:
39
40buildPythonPackage rec {
41 pname = "sentry-sdk";
42 version = "1.45.0";
43 pyproject = true;
44
45 disabled = pythonOlder "3.7";
46
47 src = fetchFromGitHub {
48 owner = "getsentry";
49 repo = "sentry-python";
50 rev = "refs/tags/${version}";
51 hash = "sha256-OWoMqJlf0vmBHWWsW6mF4u5X9USzxkFmCJyX7Ws0dD0=";
52 };
53
54 build-system = [ setuptools ];
55
56 dependencies = [
57 certifi
58 urllib3
59 ];
60
61 passthru.optional-dependencies = {
62 aiohttp = [ aiohttp ];
63 beam = [ apache-beam ];
64 bottle = [ bottle ];
65 celery = [ celery ];
66 chalice = [ chalice ];
67 django = [ django ];
68 falcon = [ falcon ];
69 flask = [
70 flask
71 blinker
72 ];
73 httpx = [ httpx ];
74 pyspark = [ pyspark ];
75 pure_eval = [
76 asttokens
77 executing
78 pure-eval
79 ];
80 quart = [
81 quart
82 blinker
83 ];
84 rq = [ rq ];
85 sanic = [ sanic ];
86 sqlalchemy = [ sqlalchemy ];
87 tornado = [ tornado ];
88 };
89
90 nativeCheckInputs = [
91 asttokens
92 executing
93 gevent
94 jsonschema
95 mock
96 pure-eval
97 pyrsistent
98 pysocks
99 pytest-forked
100 pytest-localserver
101 pytest-watch
102 pytestCheckHook
103 ];
104
105 doCheck = !stdenv.isDarwin;
106
107 disabledTests = [
108 # Issue with the asseration
109 "test_auto_enabling_integrations_catches_import_error"
110 "test_default_release"
111 ];
112
113 disabledTestPaths =
114 [
115 # Varius integration tests fail every once in a while when we
116 # upgrade dependencies, so don't bother testing them.
117 "tests/integrations/"
118 ]
119 ++ lib.optionals (stdenv.buildPlatform != "x86_64-linux") [
120 # test crashes on aarch64
121 "tests/test_transport.py"
122 ];
123
124 pythonImportsCheck = [ "sentry_sdk" ];
125
126 meta = with lib; {
127 description = "Python SDK for Sentry.io";
128 homepage = "https://github.com/getsentry/sentry-python";
129 changelog = "https://github.com/getsentry/sentry-python/blob/${version}/CHANGELOG.md";
130 license = licenses.bsd2;
131 maintainers = with maintainers; [
132 fab
133 gebner
134 ];
135 };
136}