Merge pull request #113706 from fabaff/pymysensors

This commit is contained in:
Sandro 2021-02-20 04:13:21 +01:00 committed by GitHub
commit a304559fb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 9 deletions

View file

@ -1,5 +1,10 @@
{ lib, buildPythonPackage, fetchFromGitHub
, pytest, pytest-benchmark, pytest-mock }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest-benchmark
, pytest-mock
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "getmac";
@ -7,19 +12,32 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "GhostofGoes";
repo = "getmac";
repo = pname;
rev = version;
sha256 = "08d4iv5bjl1s4i9qhzf3pzjgj1rgbwi0x26qypf3ycgdj0a6gvh2";
};
checkInputs = [ pytest pytest-benchmark pytest-mock ];
checkPhase = ''
pytest --ignore tests/test_cli.py
'';
checkInputs = [
pytestCheckHook
pytest-benchmark
pytest-mock
];
disabledTests = [
# Disable CLI tests
"test_cli_main_basic"
"test_cli_main_verbose"
"test_cli_main_debug"
"test_cli_multiple_debug_levels"
# Disable test that require network access
"test_uuid_lanscan_iface"
];
pythonImportsCheck = [ "getmac" ];
meta = with lib; {
description = "Python package to get the MAC address of network interfaces and hosts on the local network";
homepage = "https://github.com/GhostofGoes/getmac";
description = "Pure-Python package to get the MAC address of network interfaces and hosts on the local network.";
license = licenses.mit;
maintainers = with maintainers; [ colemickens ];
};

View file

@ -0,0 +1,55 @@
{ lib
, buildPythonPackage
, click
, crcmod
, fetchFromGitHub
, getmac
, intelhex
, paho-mqtt
, pyserial
, pyserial-asyncio
, pytest-sugar
, pytest-timeout
, pytestCheckHook
, pythonOlder
, voluptuous
}:
buildPythonPackage rec {
pname = "pymysensors";
version = "0.20.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "theolind";
repo = pname;
rev = version;
sha256 = "1hz3551ydsmd23havd0dljmvkhzjnmd28k41ws60s8ms3gzlzqfy";
};
propagatedBuildInputs = [
click
crcmod
getmac
intelhex
paho-mqtt
pyserial
pyserial-asyncio
voluptuous
];
checkInputs = [
pytest-sugar
pytest-timeout
pytestCheckHook
];
pythonImportsCheck = [ "mysensors" ];
meta = with lib; {
description = "Python API for talking to a MySensors gateway";
homepage = "https://github.com/theolind/pymysensors";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -523,7 +523,7 @@
"mychevy" = ps: with ps; [ ]; # missing inputs: mychevy
"mycroft" = ps: with ps; [ ]; # missing inputs: mycroftapi
"myq" = ps: with ps; [ pymyq ];
"mysensors" = ps: with ps; [ aiohttp-cors paho-mqtt ]; # missing inputs: pymysensors
"mysensors" = ps: with ps; [ aiohttp-cors paho-mqtt pymysensors ];
"mystrom" = ps: with ps; [ aiohttp-cors python-mystrom ];
"mythicbeastsdns" = ps: with ps; [ ]; # missing inputs: mbddns
"n26" = ps: with ps; [ ]; # missing inputs: n26

View file

@ -5718,6 +5718,8 @@ in {
pymyq = callPackage ../development/python-modules/pymyq { };
pymysensors = callPackage ../development/python-modules/pymysensors { };
pymysql = callPackage ../development/python-modules/pymysql { };
pymysqlsa = callPackage ../development/python-modules/pymysqlsa { };