Skip to content

Commit b309fd0

Browse files
python312Packages.enturclient: fix build, misc. cleanup
1 parent 59b1aef commit b309fd0

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

pkgs/development/python-modules/enturclient/default.nix

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
fetchFromGitHub,
77
poetry-core,
88
pythonOlder,
9+
unittestCheckHook,
910
}:
1011

1112
buildPythonPackage rec {
1213
pname = "enturclient";
1314
version = "0.2.4";
14-
disabled = pythonOlder "3.8";
15+
pyproject = true;
1516

16-
format = "pyproject";
17+
disabled = pythonOlder "3.8";
1718

1819
src = fetchFromGitHub {
1920
owner = "hfurubotten";
@@ -22,23 +23,27 @@ buildPythonPackage rec {
2223
hash = "sha256-Y2sBPikCAxumylP1LUy8XgjBRCWaNryn5XHSrRjJIIo=";
2324
};
2425

25-
nativeBuildInputs = [ poetry-core ];
26+
build-system = [ poetry-core ];
2627

27-
propagatedBuildInputs = [
28+
dependencies = [
2829
aiohttp
2930
async-timeout
3031
];
3132

32-
postPatch = ''
33-
substituteInPlace pyproject.toml \
34-
--replace 'async_timeout = "^3.0.1"' 'async_timeout = ">=3.0.1"'
35-
'';
36-
37-
# Project has no tests
38-
doCheck = false;
33+
pythonRelaxDeps = [
34+
"async_timeout"
35+
];
3936

4037
pythonImportsCheck = [ "enturclient" ];
4138

39+
nativeCheckInputs = [
40+
unittestCheckHook
41+
];
42+
43+
unittestFlagsArray = [
44+
"tests/dto/"
45+
];
46+
4247
meta = with lib; {
4348
description = "Python library for interacting with the Entur.org API";
4449
homepage = "https://github.com/hfurubotten/enturclient";

0 commit comments

Comments
 (0)