1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 lxml,
7 pytest-aiohttp,
8 pytestCheckHook,
9 pythonOlder,
10 setuptools-scm,
11}:
12
13buildPythonPackage rec {
14 pname = "afsapi";
15 version = "0.2.8";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "wlcrs";
22 repo = "python-afsapi";
23 tag = version;
24 hash = "sha256-eE5BsXNtSU6YUhRn4/SKpMrqaYf8tyfLKdxxGOmNJ9I=";
25 };
26
27 nativeBuildInputs = [ setuptools-scm ];
28
29 propagatedBuildInputs = [
30 aiohttp
31 lxml
32 ];
33
34 doCheck = false; # Failed: async def functions are not natively supported.
35
36 nativeCheckInputs = [
37 pytest-aiohttp
38 pytestCheckHook
39 ];
40
41 enabledTestPaths = [ "async_tests.py" ];
42
43 pythonImportsCheck = [ "afsapi" ];
44
45 meta = with lib; {
46 description = "Python implementation of the Frontier Silicon API";
47 homepage = "https://github.com/wlcrs/python-afsapi";
48 changelog = "https://github.com/wlcrs/python-afsapi/releases/tag/${version}";
49 license = licenses.asl20;
50 maintainers = with maintainers; [ fab ];
51 };
52}