2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
requests-mock,
|
|
|
|
setuptools,
|
2021-12-24 04:21:11 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "losant-rest";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "1.20.1";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Losant";
|
|
|
|
repo = "losant-rest-python";
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-1CxcA9/FvKP3P0Q02by0hBHQTAcbfLCp3AualHhZyvY=";
|
2021-12-24 04:21:11 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [ requests ];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-24 04:21:11 +00:00
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pytestFlagsArray = [ "tests/platformrest_tests.py" ];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "platformrest" ];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module for consuming the Losant IoT Platform API";
|
|
|
|
homepage = "https://github.com/Losant/losant-rest-python";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|