python312Packages.enturclient: fix build, misc. cleanup (#379040)

This commit is contained in:
Fabian Affolter
2025-02-03 21:26:06 +01:00
committed by GitHub
@@ -6,14 +6,15 @@
fetchFromGitHub,
poetry-core,
pythonOlder,
unittestCheckHook,
}:
buildPythonPackage rec {
pname = "enturclient";
version = "0.2.4";
disabled = pythonOlder "3.8";
pyproject = true;
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "hfurubotten";
@@ -22,23 +23,27 @@ buildPythonPackage rec {
hash = "sha256-Y2sBPikCAxumylP1LUy8XgjBRCWaNryn5XHSrRjJIIo=";
};
nativeBuildInputs = [ poetry-core ];
build-system = [ poetry-core ];
propagatedBuildInputs = [
dependencies = [
aiohttp
async-timeout
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'async_timeout = "^3.0.1"' 'async_timeout = ">=3.0.1"'
'';
# Project has no tests
doCheck = false;
pythonRelaxDeps = [
"async_timeout"
];
pythonImportsCheck = [ "enturclient" ];
nativeCheckInputs = [
unittestCheckHook
];
unittestFlagsArray = [
"tests/dto/"
];
meta = with lib; {
description = "Python library for interacting with the Entur.org API";
homepage = "https://github.com/hfurubotten/enturclient";