summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pyjwt
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
committerRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
commit4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch)
treee2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules/pyjwt
parentjq: fix build with structured-attrs on darwin (diff)
parentMerge pull request #123802 from superherointj/package-virtmanager-bugfix (diff)
downloadnixpkgs-origin/structured-attrs.tar.gz
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/python-modules/pyjwt')
-rw-r--r--pkgs/development/python-modules/pyjwt/1.nix38
-rw-r--r--pkgs/development/python-modules/pyjwt/default.nix41
2 files changed, 62 insertions, 17 deletions
diff --git a/pkgs/development/python-modules/pyjwt/1.nix b/pkgs/development/python-modules/pyjwt/1.nix
new file mode 100644
index 000000000000..285e5e2e7600
--- /dev/null
+++ b/pkgs/development/python-modules/pyjwt/1.nix
@@ -0,0 +1,38 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, cryptography
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+ pname = "PyJWT";
+ version = "1.7.1";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd";
+ };
+
+ postPatch = ''
+ substituteInPlace setup.py --replace "pytest>=4.0.1,<5.0.0" "pytest"
+
+ # drop coverage
+ sed -i '/pytest-cov/d' setup.py
+ sed -i '/--cov/d' setup.cfg
+ '';
+
+ propagatedBuildInputs = [
+ cryptography
+ ];
+
+ checkInputs = [
+ pytestCheckHook
+ ];
+
+ meta = with lib; {
+ description = "JSON Web Token implementation in Python";
+ homepage = "https://github.com/jpadilla/pyjwt";
+ license = licenses.mit;
+ };
+}
diff --git a/pkgs/development/python-modules/pyjwt/default.nix b/pkgs/development/python-modules/pyjwt/default.nix
index c33f2b068087..4617869988f6 100644
--- a/pkgs/development/python-modules/pyjwt/default.nix
+++ b/pkgs/development/python-modules/pyjwt/default.nix
@@ -1,28 +1,35 @@
-{ lib, buildPythonPackage, fetchPypi
-, cryptography, ecdsa
-, pytestrunner, pytestcov, pytest }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+, cryptography
+, ecdsa
+, pytest-cov
+, pytestCheckHook
+, pythonOlder
+}:
buildPythonPackage rec {
- pname = "PyJWT";
- version = "2.0.1";
+ pname = "pyjwt";
+ version = "2.1.0";
+ disabled = pythonOlder "3.6";
src = fetchPypi {
- inherit pname version;
- sha256 = "a5c70a06e1f33d81ef25eecd50d50bd30e34de1ca8b2b9fa3fe0daaabcf69bf7";
+ pname = "PyJWT";
+ inherit version;
+ sha256 = "sha256-+6ROeJi7yhYKKytQH0koJPyDgkhdOm8Rul0MGTfOYTA=";
};
- propagatedBuildInputs = [ cryptography ecdsa ];
+ propagatedBuildInputs = [
+ cryptography
+ ecdsa
+ ];
- checkInputs = [ pytestrunner pytestcov pytest ];
+ checkInputs = [
+ pytest-cov
+ pytestCheckHook
+ ];
- postPatch = ''
- substituteInPlace setup.py --replace "pytest>=4.0.1,<5.0.0" "pytest"
- '';
-
- # ecdsa changed internal behavior
- checkPhase = ''
- pytest tests -k 'not ec_verify_should_return_false_if_signature_invalid'
- '';
+ pythonImportsCheck = [ "jwt" ];
meta = with lib; {
description = "JSON Web Token implementation in Python";