1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 cython,
7 expandvars,
8 setuptools,
9 idna,
10 multidict,
11 pytest-cov-stub,
12 pytest-xdist,
13 pytestCheckHook,
14}:
15
16buildPythonPackage rec {
17 pname = "yarl";
18 version = "1.13.1";
19
20 disabled = pythonOlder "3.8";
21
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "aio-libs";
26 repo = "yarl";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-I6/c5Q6/SRw8PIW4rPLKhVRVPRIC+n+Cz+UrKn5Pv/0=";
29 };
30
31 build-system = [
32 cython
33 expandvars
34 setuptools
35 ];
36
37 dependencies = [
38 idna
39 multidict
40 ];
41
42 preCheck = ''
43 # don't import yarl from ./ so the C extension is available
44 pushd tests
45 '';
46
47 nativeCheckInputs = [
48 pytest-cov-stub
49 pytest-xdist
50 pytestCheckHook
51 ];
52
53 postCheck = ''
54 popd
55 '';
56
57 pythonImportsCheck = [ "yarl" ];
58
59 meta = with lib; {
60 changelog = "https://github.com/aio-libs/yarl/blob/v${version}/CHANGES.rst";
61 description = "Yet another URL library";
62 homepage = "https://github.com/aio-libs/yarl";
63 license = licenses.asl20;
64 maintainers = with maintainers; [ dotlambda ];
65 };
66}