1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6
7 # build-system
8 setuptools,
9
10 # dependencies
11 aiohttp,
12 incremental,
13
14 # tests
15 aioresponses,
16 pytest-aiohttp,
17 pytest-asyncio,
18 pytest-socket,
19 pytestCheckHook,
20 syrupy,
21}:
22
23buildPythonPackage rec {
24 pname = "aioazuredevops";
25 version = "2.2.1";
26 pyproject = true;
27
28 disabled = pythonOlder "3.12";
29
30 src = fetchFromGitHub {
31 owner = "timmo001";
32 repo = "aioazuredevops";
33 tag = version;
34 hash = "sha256-RZBiFPzYtEoc51T3irVHL9xVlZgACyM2lu1TkMoatqU=";
35 };
36
37 postPatch = ''
38 substituteInPlace requirements_setup.txt \
39 --replace-fail "==" ">="
40 '';
41
42 build-system = [
43 incremental
44 setuptools
45 ];
46
47 dependencies = [
48 aiohttp
49 incremental
50 ];
51
52 nativeCheckInputs = [
53 aioresponses
54 pytest-aiohttp
55 pytest-asyncio
56 pytest-socket
57 pytestCheckHook
58 syrupy
59 ];
60
61 disabledTests = [
62 # https://github.com/timmo001/aioazuredevops/issues/44
63 "test_get_project"
64 "test_get_builds"
65 "test_get_build"
66 ];
67
68 pytestFlagsArray = [ "--snapshot-update" ];
69
70 pythonImportsCheck = [ "aioazuredevops" ];
71
72 meta = with lib; {
73 changelog = "https://github.com/timmo001/aioazuredevops/releases/tag/${version}";
74 description = "Get data from the Azure DevOps API";
75 homepage = "https://github.com/timmo001/aioazuredevops";
76 license = licenses.mit;
77 maintainers = with maintainers; [ dotlambda ];
78 };
79}