1{
2 lib,
3 aiohttp,
4 aioresponses,
5 buildPythonPackage,
6 fetchFromGitHub,
7 hatch-regex-commit,
8 hatchling,
9 pytest-asyncio,
10 pytest-cov-stub,
11 pytestCheckHook,
12 python-dotenv,
13 pythonOlder,
14}:
15
16buildPythonPackage rec {
17 pname = "pyloadapi";
18 version = "1.4.2";
19 pyproject = true;
20
21 disabled = pythonOlder "3.12";
22
23 src = fetchFromGitHub {
24 owner = "tr4nt0r";
25 repo = "pyloadapi";
26 tag = "v${version}";
27 hash = "sha256-DkYbQB91KYskfm2yDVmR0/MJiixC2C5miHpTq7RpVBU=";
28 };
29
30 build-system = [
31 hatch-regex-commit
32 hatchling
33 ];
34
35 dependencies = [ aiohttp ];
36
37 nativeCheckInputs = [
38 aioresponses
39 pytest-asyncio
40 pytest-cov-stub
41 pytestCheckHook
42 python-dotenv
43 ];
44
45 pythonImportsCheck = [ "pyloadapi" ];
46
47 disabledTestPaths = [
48 # Tests require network access
49 "tests/test_cli.py"
50 ];
51
52 meta = with lib; {
53 description = "Simple wrapper for pyLoad's API";
54 homepage = "https://github.com/tr4nt0r/pyloadapi";
55 changelog = "https://github.com/tr4nt0r/pyloadapi/blob/${src.tag}/CHANGELOG.md";
56 license = licenses.mit;
57 maintainers = with maintainers; [ fab ];
58 };
59}