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