Merge pull request #127474 from dotlambda/pyhiveapi-init
This commit is contained in:
commit
824cadb607
63
pkgs/development/python-modules/pyhiveapi/default.nix
Normal file
63
pkgs/development/python-modules/pyhiveapi/default.nix
Normal file
@ -0,0 +1,63 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, unasync
|
||||
, boto3
|
||||
, botocore
|
||||
, requests
|
||||
, aiohttp
|
||||
, pyquery
|
||||
, loguru
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyhiveapi";
|
||||
version = "0.4.2";
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Pyhass";
|
||||
repo = "Pyhiveapi";
|
||||
rev = "v${version}";
|
||||
sha256 = "0x9cfxfdpccz360azpyfhvn09xxkw7vxy42npgbqhpy2g6mh5sif";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt \
|
||||
--replace "pre-commit" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
unasync
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
boto3
|
||||
botocore
|
||||
requests
|
||||
aiohttp
|
||||
pyquery
|
||||
loguru
|
||||
];
|
||||
|
||||
# tests are not functional yet
|
||||
doCheck = false;
|
||||
|
||||
postBuild = ''
|
||||
# pyhiveapi accesses $HOME upon importing
|
||||
export HOME=$TMPDIR
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "pyhiveapi" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python library to interface with the Hive API";
|
||||
homepage = "https://github.com/Pyhass/Pyhiveapi";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
45
pkgs/development/python-modules/unasync/default.nix
Normal file
45
pkgs/development/python-modules/unasync/default.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, setuptools
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "unasync";
|
||||
version = "0.5.0";
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "python-trio";
|
||||
repo = "unasync";
|
||||
rev = "v${version}";
|
||||
sha256 = "0h86i09v4909a8nk5lp36jlwz6rsln6vyg3d0i13ykxa6lrx1c2l";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# mess with $PYTHONPATH
|
||||
"test_build_py_modules"
|
||||
"test_build_py_packages"
|
||||
"test_project_structure_after_build_py_packages"
|
||||
"test_project_structure_after_customized_build_py_packages"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "unasync" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Project that can transform your asynchronous code into synchronous code";
|
||||
homepage = "https://github.com/python-trio/unasync";
|
||||
license = with licenses; [ mit /* or */ asl20 ];
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
@ -352,7 +352,7 @@
|
||||
"history" = ps: with ps; [ aiohttp-cors sqlalchemy ];
|
||||
"history_stats" = ps: with ps; [ sqlalchemy ];
|
||||
"hitron_coda" = ps: with ps; [ ];
|
||||
"hive" = ps: with ps; [ ]; # missing inputs: pyhiveapi
|
||||
"hive" = ps: with ps; [ pyhiveapi ];
|
||||
"hlk_sw16" = ps: with ps; [ ]; # missing inputs: hlk-sw16
|
||||
"home_connect" = ps: with ps; [ aiohttp-cors homeconnect ];
|
||||
"home_plus_control" = ps: with ps; [ aiohttp-cors homepluscontrol ];
|
||||
|
@ -443,6 +443,7 @@ in with py.pkgs; buildPythonApplication rec {
|
||||
"heos"
|
||||
"history"
|
||||
"history_stats"
|
||||
"hive"
|
||||
"home_connect"
|
||||
"home_plus_control"
|
||||
"homeassistant"
|
||||
|
@ -5268,6 +5268,8 @@ in {
|
||||
|
||||
pyheos = callPackage ../development/python-modules/pyheos { };
|
||||
|
||||
pyhiveapi = callPackage ../development/python-modules/pyhiveapi { };
|
||||
|
||||
pynndescent = callPackage ../development/python-modules/pynndescent { };
|
||||
|
||||
pynobo = callPackage ../development/python-modules/pynobo { };
|
||||
@ -8742,6 +8744,8 @@ in {
|
||||
|
||||
u-msgpack-python = callPackage ../development/python-modules/u-msgpack-python { };
|
||||
|
||||
unasync = callPackage ../development/python-modules/unasync { };
|
||||
|
||||
uncertainties = callPackage ../development/python-modules/uncertainties { };
|
||||
|
||||
uncompyle6 = callPackage ../development/python-modules/uncompyle6 { };
|
||||
|
Loading…
Reference in New Issue
Block a user