Merge pull request #327487 from mweinelt/pyindego-3.2.1

python312Packages.pyindego: 3.1.1 -> 3.2.1
This commit is contained in:
Martin Weinelt 2024-07-18 16:05:30 +02:00 committed by GitHub
commit bd8bc51c60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 24 additions and 16 deletions

View File

@ -1,7 +1,7 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
# build-system
setuptools,
@ -20,15 +20,20 @@
buildPythonPackage rec {
pname = "pyindego";
version = "3.1.1";
version = "3.2.1";
pyproject = true;
src = fetchPypi {
pname = "pyIndego";
inherit version;
hash = "sha256-lRDi6qYMaPI8SiSNe0vzlKb92axujt44aei8opNPDug=";
src = fetchFromGitHub {
owner = "jm-73";
repo = "pyIndego";
rev = "refs/tags/${version}";
hash = "sha256-wPQocacWwWjEH4boMZ33aW/NPvdD6LSmMTFXGwBwwq8=";
};
postPatch = ''
sed -i "/addopts/d" pytest.ini
'';
build-system = [ setuptools ];
dependencies = [

View File

@ -9,14 +9,14 @@
}:
let
pname = "tuya-device-sharing-sdk";
version = "0.2.0";
version = "0.1.9";
in
buildPythonPackage {
inherit pname version;
src = fetchPypi {
inherit pname version;
hash = "sha256-fu8zh59wlnxtstNbNL8mIm10tiXy22oPbi6oUy5x8c8=";
hash = "sha256-mBKR+ttBo0VF33pEmYdjbyM4bGgyDiYexIIsf8mXZW4=";
};
# workaround needed, upstream issue: https://github.com/tuya/tuya-device-sharing-sdk/issues/10

View File

@ -5,17 +5,21 @@ import os
import sys
import importlib_metadata
from packaging.requirements import Requirement
from packaging.requirements import InvalidRequirement, Requirement
def error(msg: str) -> None:
def error(msg: str, ret: bool = False) -> None:
print(f" - {msg}", file=sys.stderr)
return False
return ret
def check_requirement(req: str):
# https://packaging.pypa.io/en/stable/requirements.html
requirement = Requirement(req)
try:
requirement = Requirement(req)
except InvalidRequirement:
return error(f"{req} could not be parsed", ret=True)
try:
version = importlib_metadata.distribution(requirement.name).version
except importlib_metadata.PackageNotFoundError:

View File

@ -8,13 +8,13 @@
buildHomeAssistantComponent rec {
owner = "jm-73";
domain = "indego";
version = "5.5.0";
version = "5.7.2";
src = fetchFromGitHub {
owner = "jm-73";
repo = "Indego";
rev = "refs/tags/${version}";
hash = "sha256-ur6KOqU6KAseABL0ibpGJ6109wSSZq9HWSVbMIrRSqc=";
hash = "sha256-9q8aHbAMIA2xKhZl/CDXWSV1ylDCEVkpL8OUlELoG0Q=";
};
dependencies = [ pyindego ];
@ -23,8 +23,7 @@ buildHomeAssistantComponent rec {
description = "Bosch Indego lawn mower component";
changelog = "https://github.com/jm-73/Indego/releases/tag/${version}";
homepage = "https://github.com/jm-73/Indego";
# https://github.com/jm-73/pyIndego/issues/125
license = licenses.unfree;
license = licenses.asl20;
maintainers = with maintainers; [ hexa ];
};
}