2020-05-03 17:38:23 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
2020-05-03 17:38:23 +00:00
|
|
|
, requests
|
|
|
|
, pyyaml
|
|
|
|
, jsonlines
|
2022-04-03 18:54:34 +00:00
|
|
|
, pythonOlder
|
2024-02-29 20:09:43 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pytz
|
2020-05-03 17:38:23 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cloudflare";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.20.0";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-04-03 18:54:34 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-Rq78Od+qI2XWObQjzsLNU1CuERU8ckfT6zVFvc8Bpoo=";
|
2020-05-03 17:38:23 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
pyyaml
|
|
|
|
jsonlines
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
# tests require networking
|
2020-05-03 17:38:23 +00:00
|
|
|
doCheck = false;
|
2022-04-03 18:54:34 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"CloudFlare"
|
|
|
|
];
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python wrapper for the Cloudflare v4 API";
|
|
|
|
homepage = "https://github.com/cloudflare/python-cloudflare";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/cloudflare/python-cloudflare/blob/${version}/CHANGELOG.md";
|
2020-05-03 17:38:23 +00:00
|
|
|
license = licenses.mit;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "cli4";
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-05-03 17:38:23 +00:00
|
|
|
};
|
|
|
|
}
|