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