1{ lib, buildPythonPackage, fetchFromGitHub
2, flit
3, lxml, aiohttp
4, pytest, pytestcov, pytest-asyncio, pytest-mock, pytest-aiohttp, aresponses
5, pythonOlder
6}:
7
8buildPythonPackage rec {
9 pname = "PyRMVtransport";
10 version = "0.2.9";
11 format = "pyproject";
12 disabled = pythonOlder "3.6";
13
14 src = fetchFromGitHub {
15 owner = "cgtobi";
16 repo = pname;
17 rev = "v${version}";
18 sha256 = "1h3d0yxzrfi47zil5gr086v0780q768z8v5psvcikqw852f93vxb";
19 };
20
21 nativeBuildInputs = [
22 flit
23 ];
24
25 propagatedBuildInputs = [
26 aiohttp
27 lxml
28 ];
29
30 checkInputs = [
31 pytest
32 pytestcov
33 pytest-asyncio
34 pytest-mock
35 pytest-aiohttp
36 aresponses
37 ];
38 checkPhase = ''
39 pytest --cov=RMVtransport tests
40 '';
41
42 meta = with lib; {
43 homepage = "https://github.com/cgtobi/PyRMVtransport";
44 description = "Get transport information from opendata.rmv.de";
45 license = licenses.mit;
46 maintainers = with maintainers; [ hexa ];
47 };
48}