Unverified Commit 70a7328f authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

Merge pull request #327185 from pyrox0/pythonpackages/aioaquacell-init

home-assistant: support aquacell component
parents 590a4298 294c9eea
Loading
Loading
Loading
Loading
+48 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  setuptools,
  aiobotocore,
  aiohttp,
  attr,
  aws-request-signer,
  botocore,
  requests-aws4auth,
  pycognito,
}:

buildPythonPackage rec {
  pname = "aioaquacell";
  version = "0.2.0";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-n2kPD1t5d/nf43rB0q1hNNYdHeaBiadsFWTmu1bYN1A=";
  };

  build-system = [ setuptools ];

  dependencies = [
    aiohttp
    aiobotocore
    attr
    aws-request-signer
    botocore
    requests-aws4auth
    pycognito
  ];

  pythonImportsCheck = [ "aioaquacell" ];

  doCheck = false;

  meta = {
    changelog = "https://github.com/Jordi1990/aioaquacell/releases/tag/v${version}";
    description = "Asynchronous library to retrieve details of your Aquacell water softener device.";
    homepage = "https://github.com/Jordi1990/aioaquacell";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ pyrox0 ];
  };
}
+35 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  python,
}:

buildPythonPackage rec {
  pname = "attr";
  version = "0.3.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "denis-ryzhkov";
    repo = "attr";
    rev = version;
    hash = "sha256-1gOAONDuZb7xEPFZJc00BRtFF06uX65S8b3RRRNGeSo=";
  };

  build-system = [ setuptools ];

  checkPhase = ''
    runHook preCheck
    ${python.interpreter} -c "import dry_attr; dry_attr.test()"
    runHook postCheck
  '';

  meta = {
    description = "Simple decorator to set attributes of target function or class in a DRY way.";
    homepage = "https://github.com/denis-ryzhkov/attr";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ pyrox0 ];
  };
}
+43 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  poetry-core,
  requests,
  requests-toolbelt,
}:

buildPythonPackage rec {
  pname = "aws-request-signer";
  version = "1.2.0";
  pyproject = true;

  src = fetchPypi {
    inherit version;
    pname = "aws_request_signer";
    hash = "sha256-DVorDO0wz94Fhduax7VsQZ5B5SnBfsHQoLoW4m6Ce+U=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail "poetry>=0.12" poetry-core \
      --replace-fail poetry.masonry.api poetry.core.masonry.api
  '';

  build-system = [ poetry-core ];

  dependencies = [
    requests
    requests-toolbelt
  ];

  doCheck = false;

  meta = {
    changelog = "https://github.com/iksteen/aws-request-signer/releases/tag/${version}";
    description = "Python library to sign AWS requests using AWS Signature V4.";
    homepage = "https://github.com/iksteen/aws-request-signer";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ pyrox0 ];
  };
}
+3 −1
Original line number Diff line number Diff line
@@ -219,11 +219,12 @@
      apsystems-ez1
    ];
    "aquacell" = ps: with ps; [
      aioaquacell
      fnv-hash-fast
      ifaddr
      psutil-home-assistant
      sqlalchemy
    ]; # missing inputs: aioaquacell
    ];
    "aqualogic" = ps: with ps; [
      aqualogic
    ];
@@ -5274,6 +5275,7 @@
    "aprilaire"
    "aprs"
    "apsystems"
    "aquacell"
    "aranet"
    "arcam_fmj"
    "aseko_pool_live"
+6 −0
Original line number Diff line number Diff line
@@ -157,6 +157,8 @@ self: super: with self; {
  aioapns = callPackage ../development/python-modules/aioapns { };
  aioaquacell = callPackage ../development/python-modules/aioaquacell { };
  aiocron = callPackage ../development/python-modules/aiocron { };
  ailment = callPackage ../development/python-modules/ailment { };
@@ -945,6 +947,8 @@ self: super: with self; {
  attacut = callPackage ../development/python-modules/attacut { };
  attr = callPackage ../development/python-modules/attr { };
  attrdict = callPackage ../development/python-modules/attrdict { };
  attrs = callPackage ../development/python-modules/attrs { };
@@ -1062,6 +1066,8 @@ self: super: with self; {
  aws-lambda-builders = callPackage ../development/python-modules/aws-lambda-builders { };
  aws-request-signer = callPackage ../development/python-modules/aws-request-signer { };
  aws-sam-translator = callPackage ../development/python-modules/aws-sam-translator { };
  aws-secretsmanager-caching = callPackage ../development/python-modules/aws-secretsmanager-caching { };