Merge pull request #120266 from fabaff/aiopvpc

python3Packages.aiopvpc: init at 2.0.2
This commit is contained in:
Fabian Affolter 2021-05-07 19:54:47 +02:00 committed by GitHub
commit fecd9ba4c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 70 additions and 1 deletions

View file

@ -0,0 +1,66 @@
{ lib
, aiohttp
, async-timeout
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, poetry-core
, pytest-asyncio
, pytest-timeout
, pytestCheckHook
, pythonOlder
, pytz
}:
buildPythonPackage rec {
pname = "aiopvpc";
version = "2.0.2";
disabled = pythonOlder "3.7";
format = "pyproject";
src = fetchFromGitHub {
owner = "azogue";
repo = pname;
rev = "v${version}";
sha256 = "1ajs4kbdlfn4h7f3d6lwkp4yl1rl7zyvj997nhsz93jjwxbajkpv";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
pytz
async-timeout
];
checkInputs = [
pytest-asyncio
pytest-timeout
pytestCheckHook
];
patches = [
# Switch to poetry-core, https://github.com/azogue/aiopvpc/pull/10
(fetchpatch {
name = "use-peotry-core.patch";
url = "https://github.com/azogue/aiopvpc/commit/4bc2740ffd485a60acf579b4f3eb5ee6a353245c.patch";
sha256 = "0ynj7pqq3akdvdrvqcwnnslay3mn1q92qhk8fg95ppflzscixli6";
})
];
postPatch = ''
substituteInPlace pytest.ini --replace \
" --cov --cov-report term --cov-report html" ""
'';
pythonImportsCheck = [ "aiopvpc" ];
meta = with lib; {
description = "Python module to download Spanish electricity hourly prices (PVPC)";
homepage = "https://github.com/azogue/aiopvpc";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -660,7 +660,7 @@
"pushover" = ps: with ps; [ pushover-complete ]; "pushover" = ps: with ps; [ pushover-complete ];
"pushsafer" = ps: with ps; [ ]; "pushsafer" = ps: with ps; [ ];
"pvoutput" = ps: with ps; [ jsonpath xmltodict ]; "pvoutput" = ps: with ps; [ jsonpath xmltodict ];
"pvpc_hourly_pricing" = ps: with ps; [ ]; # missing inputs: aiopvpc "pvpc_hourly_pricing" = ps: with ps; [ aiopvpc ];
"pyload" = ps: with ps; [ ]; "pyload" = ps: with ps; [ ];
"python_script" = ps: with ps; [ restrictedpython ]; "python_script" = ps: with ps; [ restrictedpython ];
"qbittorrent" = ps: with ps; [ ]; # missing inputs: python-qbittorrent "qbittorrent" = ps: with ps; [ ]; # missing inputs: python-qbittorrent

View file

@ -321,6 +321,7 @@ in with py.pkgs; buildPythonApplication rec {
"prometheus" "prometheus"
"proximity" "proximity"
"push" "push"
"pvpc_hourly_pricing"
"python_script" "python_script"
"random" "random"
"recorder" "recorder"

View file

@ -315,6 +315,8 @@ in {
aiopulse = callPackage ../development/python-modules/aiopulse { }; aiopulse = callPackage ../development/python-modules/aiopulse { };
aiopvpc = callPackage ../development/python-modules/aiopvpc { };
aiopylgtv = callPackage ../development/python-modules/aiopylgtv { }; aiopylgtv = callPackage ../development/python-modules/aiopylgtv { };
aiorecollect = callPackage ../development/python-modules/aiorecollect { }; aiorecollect = callPackage ../development/python-modules/aiorecollect { };