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

python311Packages.python-ipmi: refactor

parent 88e1b367
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -3,37 +3,40 @@
, fetchFromGitHub
, future
, mock
, nose
, pytestCheckHook
, pythonOlder
, setuptools
}:

buildPythonPackage rec {
  pname = "python-ipmi";
  version = "0.5.5";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "kontron";
    repo = pname;
    repo = "python-ipmi";
    rev = "refs/tags/${version}";
    hash = "sha256-G5FcFHtyN8bXMjj/yfJgzcfmV1mxQ9lu3GM3XMeTWVU=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "version=version," "version='${version}',"
      --replace-fail "version=version," "version='${version}',"
  '';

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    future
  ];

  nativeCheckInputs = [
    mock
    nose
    pytestCheckHook
  ];