Merge pull request #252353 from fabaff/pydrawise

python311Packages.pydrawise: init at 2023.8.0
This commit is contained in:
OTABI Tomoya 2023-08-31 09:52:21 +09:00 committed by GitHub
commit e35f1fd976
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 116 additions and 1 deletions

View file

@ -0,0 +1,45 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, graphql-core
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "apischema";
version = "0.18.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "wyfo";
repo = "apischema";
rev = "refs/tags/v${version}";
hash = "sha256-DBFFCLi8cpASyGPNqZvYe3OTLSbNZ8QzaxjQkOiHxFc=";
};
passthru.optional-dependencies = {
graphql = [
graphql-core
];
};
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
pythonImportsCheck = [
"apischema"
];
meta = with lib; {
description = "JSON (de)serialization, GraphQL and JSON schema generation using typing";
homepage = "https://github.com/wyfo/apischema";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,65 @@
{ lib
, aiohttp
, aioresponses
, apischema
, buildPythonPackage
, fetchFromGitHub
, freezegun
, gql
, graphql-core
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, requests
, setuptools
, setuptools-scm
}:
buildPythonPackage rec {
pname = "pydrawise";
version = "2023.8.0";
format = "pyproject";
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "dknowles2";
repo = "pydrawise";
rev = "refs/tags/${version}";
hash = "sha256-cnQJ0enDgOB66rEZePmfTImFrPNMiXfggATM6hsL+ag=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools
setuptools-scm
];
propagatedBuildInputs = [
aiohttp
apischema
gql
graphql-core
requests
];
nativeCheckInputs = [
aioresponses
freezegun
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [
"pydrawise"
];
meta = with lib; {
description = "Library for interacting with Hydrawise sprinkler controllers through the GraphQL API";
homepage = "https://github.com/dknowles2/pydrawise";
changelog = "https://github.com/dknowles2/pydrawise/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -1822,7 +1822,8 @@
pygti
];
"hydrawise" = ps: with ps; [
]; # missing inputs: pydrawise
pydrawise
];
"hyperion" = ps: with ps; [
hyperion-py
];

View file

@ -580,6 +580,8 @@ self: super: with self; {
apipkg = callPackage ../development/python-modules/apipkg { };
apischema = callPackage ../development/python-modules/apischema { };
apispec = callPackage ../development/python-modules/apispec { };
apispec-webframeworks = callPackage ../development/python-modules/apispec-webframeworks { };
@ -8980,6 +8982,8 @@ self: super: with self; {
inherit (pkgs) graphviz;
};
pydrawise = callPackage ../development/python-modules/pydrawise { };
pydrive2 = callPackage ../development/python-modules/pydrive2 { };
pydroid-ipcam = callPackage ../development/python-modules/pydroid-ipcam { };