2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, async-timeout
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydelijn";
|
2022-01-22 01:22:15 +00:00
|
|
|
version = "1.0.0";
|
2021-12-19 01:06:50 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-22 01:22:15 +00:00
|
|
|
sha256 = "c5b6565c50d4f97d28baca9faf487281c2a5db635060b69f659e27c28a1a6e93";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
async-timeout
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Remove with next release
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "async_timeout>=3.0.1,<4.0" "async_timeout>=3.0.1"
|
|
|
|
# https://github.com/bollewolle/pydelijn/pull/11
|
|
|
|
substituteInPlace pydelijn/common.py \
|
|
|
|
--replace ", loop=self.loop" ""
|
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pydelijn"
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python package to retrieve realtime data of passages at stops of De Lijn";
|
|
|
|
homepage = "https://github.com/bollewolle/pydelijn";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|