1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, poetry-core
6, aiohttp
7, async-timeout
8, yarl
9, aresponses
10, pytest-asyncio
11, pytestCheckHook
12}:
13
14buildPythonPackage rec {
15 pname = "here-routing";
16 version = "1.0.0";
17
18 disabled = pythonOlder "3.10";
19
20 format = "pyproject";
21
22 src = fetchFromGitHub {
23 owner = "eifinger";
24 repo = "here_routing";
25 rev = "v${version}";
26 hash = "sha256-wdjPbM9J+2q3NisdlOHIddSWHHIfwQY/83v6IBAXSq0=";
27 };
28
29 postPatch = ''
30 sed -i "/^addopts/d" pyproject.toml
31 '';
32
33 nativeBuildInputs = [
34 poetry-core
35 ];
36
37 propagatedBuildInputs = [
38 aiohttp
39 async-timeout
40 yarl
41 ];
42
43 nativeCheckInputs = [
44 aresponses
45 pytest-asyncio
46 pytestCheckHook
47 ];
48
49 pythonImportsCheck = [ "here_routing" ];
50
51 meta = {
52 changelog = "https://github.com/eifinger/here_routing/blob/${src.rev}/CHANGELOG.md";
53 description = "Asynchronous Python client for the HERE Routing V8 API";
54 homepage = "https://github.com/eifinger/here_routing";
55 license = lib.licenses.mit;
56 maintainers = with lib.maintainers; [ dotlambda ];
57 };
58}