1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 six,
6 httplib2,
7 pytestCheckHook,
8 pythonOlder,
9 requests,
10 setuptools,
11 urllib3,
12}:
13
14buildPythonPackage rec {
15 pname = "wsgi-intercept";
16 version = "1.13.1";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "cdent";
23 repo = "wsgi-intercept";
24 tag = "v${version}";
25 hash = "sha256-hs5yB0+eDlh/pNPaqYIU9C+RBpyrdPOAscQGIoqzmvU=";
26 };
27
28 build-system = [ setuptools ];
29
30 dependencies = [ six ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 httplib2
35 requests
36 urllib3
37 ];
38
39 disabledTests = [
40 # Tests require network access
41 "test_urllib3"
42 "test_requests"
43 "test_http_not_intercepted"
44 "test_https_not_intercepted"
45 "test_https_no_ssl_verification_not_intercepted"
46 ];
47
48 pythonImportsCheck = [ "wsgi_intercept" ];
49
50 meta = {
51 description = "Module that acts as a WSGI application in place of a real URI for testing";
52 homepage = "https://github.com/cdent/wsgi-intercept";
53 changelog = "https://github.com/cdent/wsgi-intercept/releases/tag/v${version}";
54 license = lib.licenses.mit;
55 maintainers = with lib.maintainers; [ mikecm ];
56 };
57}