2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
2023-02-02 18:25:31 +00:00
|
|
|
, aiohttp
|
2021-06-28 23:13:55 +00:00
|
|
|
, buildPythonPackage
|
2023-02-02 18:25:31 +00:00
|
|
|
, colorlog
|
2021-06-28 23:13:55 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, python-dateutil
|
2023-01-11 07:51:40 +00:00
|
|
|
, pythonOlder
|
2023-02-02 18:25:31 +00:00
|
|
|
, requests
|
|
|
|
, setuptools-scm
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyisy";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "3.1.13";
|
2023-01-11 07:51:40 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "automicus";
|
|
|
|
repo = "PyISY";
|
2022-04-15 01:41:22 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-FjreG+xjX8f68nUq/4HHEaYcUYjU/9sYvzmIN6kXezU=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'version_format="{tag}"' 'version="${version}"'
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2023-02-02 18:25:31 +00:00
|
|
|
colorlog
|
2021-06-28 23:13:55 +00:00
|
|
|
python-dateutil
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
# no tests implemented
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pyisy" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to talk to ISY994 from UDI";
|
|
|
|
homepage = "https://github.com/automicus/PyISY";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/automicus/PyISY/releases/tag/v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|