2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2024-09-19 14:19:46 +00:00
|
|
|
fetchFromGitHub,
|
2024-06-05 15:53:02 +00:00
|
|
|
setuptools,
|
|
|
|
cryptography,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
sphinxHook,
|
|
|
|
sphinx-rtd-theme,
|
|
|
|
zope-interface,
|
2024-09-19 14:19:46 +00:00
|
|
|
oauthlib,
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "pyjwt";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2.9.0";
|
|
|
|
pyproject = true;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jpadilla";
|
|
|
|
repo = "pyjwt";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-z1sqaSeign0ZDFcg94cli0fIVBxcK14VUlgP+mSaxRA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"doc"
|
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
sphinxHook
|
|
|
|
sphinx-rtd-theme
|
2024-01-13 08:15:51 +00:00
|
|
|
zope-interface
|
2022-10-21 18:38:19 +00:00
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
optional-dependencies.crypto = [ cryptography ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ] ++ (lib.flatten (lib.attrValues optional-dependencies));
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
disabledTests = [
|
|
|
|
# requires internet connection
|
|
|
|
"test_get_jwt_set_sslcontext_default"
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
pythonImportsCheck = [ "jwt" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit oauthlib;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/jpadilla/pyjwt/blob/${version}/CHANGELOG.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "JSON Web Token implementation in Python";
|
|
|
|
homepage = "https://github.com/jpadilla/pyjwt";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ prikhi ];
|
|
|
|
};
|
|
|
|
}
|