2021-06-20 11:13:27 +02:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, async-timeout
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-06-30 00:53:09 +02:00
|
|
|
, poetry-core
|
2021-06-20 11:13:27 +02:00
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "enturclient";
|
2022-01-19 19:51:31 +01:00
|
|
|
version = "0.2.3";
|
2021-06-30 00:53:09 +02:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-12-03 12:41:06 +01:00
|
|
|
|
2021-06-30 00:53:09 +02:00
|
|
|
format = "pyproject";
|
2021-06-20 11:13:27 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hfurubotten";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-01-19 19:51:31 +01:00
|
|
|
sha256 = "1w0791f4p3yyncc1izx3q97fyaky2ling14qr0yn0acrmq9yh5cc";
|
2021-06-20 11:13:27 +02:00
|
|
|
};
|
|
|
|
|
2021-06-30 00:53:09 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-06-20 11:13:27 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
async-timeout
|
|
|
|
];
|
|
|
|
|
2021-12-03 12:41:06 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'async_timeout = "^3.0.1"' 'async_timeout = ">=3.0.1"'
|
|
|
|
'';
|
|
|
|
|
2021-06-20 11:13:27 +02:00
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-12-03 12:41:06 +01:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"enturclient"
|
|
|
|
];
|
2021-06-20 11:13:27 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|