1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 requests,
8 responses,
9 setuptools-scm,
10}:
11
12buildPythonPackage rec {
13 pname = "testrail-api";
14 version = "1.13.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "tolstislon";
21 repo = "testrail-api";
22 rev = "refs/tags/${version}";
23 hash = "sha256-NGdNpNJ9ejwneSacNmifGJ8TMUuBqMu9tHTyLxTB5Uk=";
24 };
25
26 postPatch = ''
27 substituteInPlace setup.py \
28 --replace "setuptools_scm==7.1.0" "setuptools_scm"
29 '';
30
31 nativeBuildInputs = [ setuptools-scm ];
32
33 propagatedBuildInputs = [ requests ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 responses
38 ];
39
40 pythonImportsCheck = [ "testrail_api" ];
41
42 meta = with lib; {
43 description = "A Python wrapper of the TestRail API";
44 homepage = "https://github.com/tolstislon/testrail-api";
45 changelog = "https://github.com/tolstislon/ytestrail-api/releases/tag/${version}";
46 license = with licenses; [ mit ];
47 maintainers = with maintainers; [ aanderse ];
48 };
49}