Commit 2e9100bd authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python311Packages.pykoplenti: refactor

parent 9969fb7f
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -13,13 +13,13 @@
buildPythonPackage rec {
  pname = "pykoplenti";
  version = "1.2.2";
  format = "pyproject";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "stegm";
    repo = pname;
    repo = "pykoplenti";
    rev = "refs/tags/v${version}";
    hash = "sha256-2sGkHCIGo1lzLurvQBmq+16sodAaK8v+mAbIH/Gd3+E=";
  };
@@ -28,12 +28,6 @@ buildPythonPackage rec {
    setuptools
  ];

  postPatch = ''
    # remove with 1.1.0
    substituteInPlace setup.cfg \
      --replace 'version = unreleased' 'version = ${version}'
  '';

  propagatedBuildInputs = [
    aiohttp
    pycryptodome
@@ -50,11 +44,14 @@ buildPythonPackage rec {
  # Project has no tests
  doCheck = false;

  pythonImportsCheck = [ "pykoplenti" ];
  pythonImportsCheck = [
    "pykoplenti"
  ];

  meta = with lib; {
    description = "Python REST client API for Kostal Plenticore Inverters";
    homepage = "https://github.com/stegm/pykoplenti/";
    changelog = "https://github.com/stegm/pykoplenti/releases/tag/v${version}";
    license = with licenses; [ asl20 ];
    maintainers = with maintainers; [ fab ];
  };