mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-20 15:41:16 +00:00
Merge pull request #113802 from fabaff/pyflume
This commit is contained in:
45
pkgs/development/python-modules/pyflume/default.nix
Normal file
45
pkgs/development/python-modules/pyflume/default.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, pyjwt
|
||||
, ratelimit
|
||||
, pytz
|
||||
, requests
|
||||
, requests-mock
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyflume";
|
||||
version = "0.6.2";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ChrisMandich";
|
||||
repo = "PyFlume";
|
||||
rev = "v${version}";
|
||||
sha256 = "0i181c8722j831bjlcjwv5ccy20hl8zzlv7bfp8w0976gdmv4iz8";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pyjwt
|
||||
ratelimit
|
||||
pytz
|
||||
requests
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
requests-mock
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "pyflume" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python module to work with Flume sensors";
|
||||
homepage = "https://github.com/ChrisMandich/PyFlume";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
34
pkgs/development/python-modules/ratelimit/default.nix
Normal file
34
pkgs/development/python-modules/ratelimit/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ratelimit";
|
||||
version = "2.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tomasbasham";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "04hy3hhh5xdqcsz0lx8j18zbj88kh5ik4wyi5d3a5sfy2hx70in2";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i "/--cov/d" pytest.ini
|
||||
'';
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
|
||||
pytestFlagsArray = [ "tests" ];
|
||||
|
||||
pythonImportsCheck = [ "ratelimit" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python API Rate Limit Decorator";
|
||||
homepage = "https://github.com/tomasbasham/ratelimit";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user