2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, async-timeout
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-07-03 03:11:41 +00:00
|
|
|
, poetry-core
|
2021-06-28 23:13:55 +00:00
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "enturclient";
|
2022-01-22 01:22:15 +00:00
|
|
|
version = "0.2.3";
|
2021-07-03 03:11:41 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2021-07-03 03:11:41 +00:00
|
|
|
format = "pyproject";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hfurubotten";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-01-22 01:22:15 +00:00
|
|
|
sha256 = "1w0791f4p3yyncc1izx3q97fyaky2ling14qr0yn0acrmq9yh5cc";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2021-07-03 03:11:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
async-timeout
|
|
|
|
];
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'async_timeout = "^3.0.1"' 'async_timeout = ">=3.0.1"'
|
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"enturclient"
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for interacting with the Entur.org API";
|
|
|
|
homepage = "https://github.com/hfurubotten/enturclient";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|