1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5
6 # build-system
7 incremental,
8 setuptools,
9
10 # dependencies
11 attrs,
12 hyperlink,
13 requests,
14 twisted,
15
16 # tests
17 httpbin,
18}:
19
20buildPythonPackage rec {
21 pname = "treq";
22 version = "24.9.1";
23 pyproject = true;
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-Fdp/xATz5O1Z0Kvl+O70lm+rvmGAOaKiO8fBUwXO/qg=";
28 };
29
30 nativeBuildInputs = [
31 incremental
32 setuptools
33 ];
34
35 propagatedBuildInputs = [
36 attrs
37 hyperlink
38 incremental
39 requests
40 twisted
41 ] ++ twisted.optional-dependencies.tls;
42
43 nativeCheckInputs = [
44 httpbin
45 twisted
46 ];
47
48 checkPhase = ''
49 runHook preCheck
50
51 trial treq
52
53 runHook postCheck
54 '';
55
56 meta = with lib; {
57 homepage = "https://github.com/twisted/treq";
58 description = "Requests-like API built on top of twisted.web's Agent";
59 license = licenses.mit;
60 maintainers = [ ];
61 };
62}