summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-04-07 15:13:05 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2018-04-08 11:36:06 +0200
commit6cec0a6dc66e4a0d1022c0b7bc9227a9c4489f66 (patch)
tree5c9a870e40516bb45dfe394942165e4aa81c2dbe /pkgs/development/python-modules
parenta3688867c571e4ea8b5a1100c84bb37e800437eb (diff)
downloadnixlib-6cec0a6dc66e4a0d1022c0b7bc9227a9c4489f66.tar
nixlib-6cec0a6dc66e4a0d1022c0b7bc9227a9c4489f66.tar.gz
nixlib-6cec0a6dc66e4a0d1022c0b7bc9227a9c4489f66.tar.bz2
nixlib-6cec0a6dc66e4a0d1022c0b7bc9227a9c4489f66.tar.lz
nixlib-6cec0a6dc66e4a0d1022c0b7bc9227a9c4489f66.tar.xz
nixlib-6cec0a6dc66e4a0d1022c0b7bc9227a9c4489f66.tar.zst
nixlib-6cec0a6dc66e4a0d1022c0b7bc9227a9c4489f66.zip
python.pkgs.python-jose: 1.3.2 -> 2.0.2
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/python-jose/default.nix27
-rw-r--r--pkgs/development/python-modules/python-jose/pycryptodome.patch37
2 files changed, 16 insertions, 48 deletions
diff --git a/pkgs/development/python-modules/python-jose/default.nix b/pkgs/development/python-modules/python-jose/default.nix
index 8c78cfeacbd4..68b46743d35f 100644
--- a/pkgs/development/python-modules/python-jose/default.nix
+++ b/pkgs/development/python-modules/python-jose/default.nix
@@ -1,29 +1,34 @@
 { stdenv, buildPythonPackage, fetchFromGitHub
-, future, six, ecdsa, pycryptodome, pytest
+, future, six, ecdsa, pycryptodome, pytest, cryptography
 }:
 
 buildPythonPackage rec {
   pname = "python-jose";
-  name = "${pname}-${version}";
-  version = "1.3.2";
+  version = "2.0.2";
+
+  # no tests in PyPI tarball
   src = fetchFromGitHub {
     owner = "mpdavis";
     repo = "python-jose";
-    rev = version;
-    sha256 = "0933pbflv2pvws5m0ksz8y1fqr8m123smmrbr5k9a71nssd502sv";
+    # 2.0.2 not tagged on GitHub
+    # see https://github.com/mpdavis/python-jose/issues/86
+    rev = "28cc6719eceb89129eed59c25f7bdac015665bdd";
+    sha256 = "03wkq2rszy0rzy5gygsh4s7i6ls8zflgbcvxnflvmh7nis7002fp";
   };
 
-  buildInputs = [ pytest ];
-  checkPhase = "py.test .";
-  patches = [
-    # to use pycryptodme instead of pycrypto
-    ./pycryptodome.patch
+  checkInputs = [
+    pytest
+    cryptography # optional dependency, but needed in tests
   ];
+  checkPhase = ''
+    py.test
+  '';
+
   propagatedBuildInputs = [ future six ecdsa pycryptodome ];
+
   meta = with stdenv.lib; {
     homepage = https://github.com/mpdavis/python-jose;
     description = "A JOSE implementation in Python";
-    platforms = platforms.all;
     license = licenses.mit;
     maintainers = [ maintainers.jhhuh ];
   };
diff --git a/pkgs/development/python-modules/python-jose/pycryptodome.patch b/pkgs/development/python-modules/python-jose/pycryptodome.patch
deleted file mode 100644
index 665ad5980343..000000000000
--- a/pkgs/development/python-modules/python-jose/pycryptodome.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -ru python-jose-1.3.2/requirements.txt python-jose-1.3.2.new/requirements.txt
---- python-jose-1.3.2/requirements.txt	2016-09-05 15:13:49.000000000 +0200
-+++ python-jose-1.3.2.new/requirements.txt	2017-03-15 11:35:47.118001810 +0100
-@@ -1,3 +1,3 @@
--pycrypto
-+pycryptodome
- six
- future
-diff -ru python-jose-1.3.2/setup.py python-jose-1.3.2.new/setup.py
---- python-jose-1.3.2/setup.py	2016-09-05 15:13:49.000000000 +0200
-+++ python-jose-1.3.2.new/setup.py	2017-03-15 11:37:15.725077184 +0100
-@@ -25,12 +25,8 @@
- 
- 
- def get_install_requires():
--    if platform.python_implementation() == 'PyPy':
--        crypto_lib = 'pycryptodome >=3.3.1, <3.4.0'
--    else:
--        crypto_lib = 'pycrypto >=2.6.0, <2.7.0'
-     return [
--        crypto_lib,
-+        'pycryptodome >=3.3.1, <3.5.0',
-         'six <2.0',
-         'ecdsa <1.0',
-         'future <1.0',
-diff -ru python-jose-1.3.2/tox.ini python-jose-1.3.2.new/tox.ini
---- python-jose-1.3.2/tox.ini	2016-09-05 15:13:49.000000000 +0200
-+++ python-jose-1.3.2.new/tox.ini	2017-03-15 11:36:50.423055657 +0100
-@@ -6,7 +6,7 @@
-     py.test --cov-report term-missing --cov jose
- deps =
-     future
--    pycrypto
-+    pycryptodome
-     ecdsa
-     pytest
-     pytest-cov