depot/third_party/nixpkgs/pkgs/development/python-modules/losant-rest/default.nix

48 lines
882 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, requests
, requests-mock
}:
buildPythonPackage rec {
pname = "losant-rest";
version = "1.19.5";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Losant";
repo = "losant-rest-python";
rev = "v${version}";
hash = "sha256-oYwbCpX2mD1RMk/0ymxaA8NF9kaJ+pGQdUKk3l5Jmrs=";
};
propagatedBuildInputs = [
requests
];
nativeCheckInputs = [
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 ];
};
}