Merge pull request #113802 from fabaff/pyflume

This commit is contained in:
Sandro 2021-02-21 05:35:07 +01:00 committed by GitHub
commit 716b898cf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 1 deletions

View 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 ];
};
}

View 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 ];
};
}

View file

@ -264,7 +264,7 @@
"flick_electric" = ps: with ps; [ ]; # missing inputs: PyFlick
"flo" = ps: with ps; [ aioflo ];
"flock" = ps: with ps; [ ];
"flume" = ps: with ps; [ ]; # missing inputs: pyflume
"flume" = ps: with ps; [ pyflume ];
"flunearyou" = ps: with ps; [ ]; # missing inputs: pyflunearyou
"flux" = ps: with ps; [ ];
"flux_led" = ps: with ps; [ flux-led ];

View file

@ -5464,6 +5464,8 @@ in {
pyflakes = callPackage ../development/python-modules/pyflakes { };
pyflume = callPackage ../development/python-modules/pyflume { };
pyfma = callPackage ../development/python-modules/pyfma { };
pyfribidi = callPackage ../development/python-modules/pyfribidi { };
@ -6747,6 +6749,8 @@ in {
rasterio = callPackage ../development/python-modules/rasterio { gdal = pkgs.gdal_2; }; # gdal 3.0 not supported yet
ratelimit = callPackage ../development/python-modules/ratelimit { };
ratelimiter = callPackage ../development/python-modules/ratelimiter { };
raven = callPackage ../development/python-modules/raven { };