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