Merge pull request #126326 from fabaff/ambee

python3Packages.ambee: init at 0.2.1
This commit is contained in:
Jörg Thalheim 2021-06-12 17:11:39 +02:00 committed by GitHub
commit 01cd252a35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,56 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, aiohttp
, poetry-core
, yarl
, aresponses
, pytest-asyncio
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "ambee";
version = "0.2.1";
disabled = pythonOlder "3.8";
format = "pyproject";
src = fetchFromGitHub {
owner = "frenck";
repo = "python-ambee";
rev = "v${version}";
sha256 = "11liw2206lyrnx09giqapjpi25lr2qnbmigi6rgynr2a1i9vxy1s";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
yarl
];
checkInputs = [
aresponses
pytest-asyncio
pytestCheckHook
];
postPatch = ''
# Upstream doesn't set a version for the pyproject.toml
substituteInPlace pyproject.toml \
--replace "0.0.0" "${version}" \
--replace "--cov" ""
'';
pythonImportsCheck = [ "ambee" ];
meta = with lib; {
description = "Python client for Ambee API";
homepage = "https://github.com/frenck/python-ambee";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View File

@ -385,6 +385,8 @@ in {
amazon_kclpy = callPackage ../development/python-modules/amazon_kclpy { };
ambee = callPackage ../development/python-modules/ambee { };
ambiclimate = callPackage ../development/python-modules/ambiclimate { };
amcrest = callPackage ../development/python-modules/amcrest { };