2021-12-24 04:21:11 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "losant-rest";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "1.17.1";
|
2021-12-24 04:21:11 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Losant";
|
|
|
|
repo = "losant-rest-python";
|
|
|
|
rev = "v${version}";
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-H0dGPcGSiV8fZwZRGWIx39ObriPmsr1pZaFkSsXrTQA=";
|
2021-12-24 04:21:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests/losantrest_tests.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"losantrest"
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|