2020-06-21 15:47:51 +02:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub
|
|
|
|
, flit
|
2020-11-18 04:10:46 +01:00
|
|
|
, lxml, httpx
|
|
|
|
, pytest, pytestcov, pytest-asyncio, pytest-mock, aresponses
|
2020-06-21 15:47:51 +02:00
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "PyRMVtransport";
|
2020-11-18 04:10:46 +01:00
|
|
|
version = "0.2.10";
|
2020-06-21 15:47:51 +02:00
|
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cgtobi";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-11-18 04:10:46 +01:00
|
|
|
sha256 = "03qrylidb1d6zw6a22d1drdf73cvfxqcqaa8qi8x4pli1axcfh5w";
|
2020-06-21 15:47:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
flit
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-11-18 04:10:46 +01:00
|
|
|
httpx
|
2020-06-21 15:47:51 +02:00
|
|
|
lxml
|
|
|
|
];
|
|
|
|
|
2020-11-18 04:10:46 +01:00
|
|
|
# requires pytest-httpx
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-06-21 15:47:51 +02:00
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
pytestcov
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
2020-11-18 04:10:46 +01:00
|
|
|
# pytest-httpx is missing
|
2020-06-21 15:47:51 +02:00
|
|
|
aresponses
|
|
|
|
];
|
|
|
|
checkPhase = ''
|
|
|
|
pytest --cov=RMVtransport tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/cgtobi/PyRMVtransport";
|
|
|
|
description = "Get transport information from opendata.rmv.de";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|