Unverified Commit fe2d7c53 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

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

parents c42e4672 b309fd08
Loading
Loading
Loading
Loading
+16 −11
Original line number Diff line number Diff line
@@ -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";