diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2017-03-16 00:43:58 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-03-16 00:59:56 +0100 |
commit | 00addcb95e67ea9e6c2a6429216233a9fa96b45d (patch) | |
tree | 960beb7d8e47ed7e77dbdb65e0c5340790735c80 /pkgs/development/python-modules/python-jose | |
parent | a8f269d014dde1eb60d81d0153602a204f95ff28 (diff) | |
download | nixlib-00addcb95e67ea9e6c2a6429216233a9fa96b45d.tar nixlib-00addcb95e67ea9e6c2a6429216233a9fa96b45d.tar.gz nixlib-00addcb95e67ea9e6c2a6429216233a9fa96b45d.tar.bz2 nixlib-00addcb95e67ea9e6c2a6429216233a9fa96b45d.tar.lz nixlib-00addcb95e67ea9e6c2a6429216233a9fa96b45d.tar.xz nixlib-00addcb95e67ea9e6c2a6429216233a9fa96b45d.tar.zst nixlib-00addcb95e67ea9e6c2a6429216233a9fa96b45d.zip |
pythonPackages.python-jose: init at 1.3.2
Diffstat (limited to 'pkgs/development/python-modules/python-jose')
-rw-r--r-- | pkgs/development/python-modules/python-jose/default.nix | 29 | ||||
-rw-r--r-- | pkgs/development/python-modules/python-jose/pycryptodome.patch | 37 |
2 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-jose/default.nix b/pkgs/development/python-modules/python-jose/default.nix new file mode 100644 index 000000000000..da4dd4107461 --- /dev/null +++ b/pkgs/development/python-modules/python-jose/default.nix @@ -0,0 +1,29 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub +, future, six, ecdsa, pycryptodome, pytest +}: + +buildPythonPackage rec { + name = "python-jose-${version}"; + version = "1.3.2"; + src = fetchFromGitHub { + owner = "mpdavis"; + repo = "python-jose"; + rev = version; + sha256 = "0933pbflv2pvws5m0ksz8y1fqr8m123smmrbr5k9a71nssd502sv"; + }; + + buildInputs = [ pytest ]; + checkPhase = "py.test ."; + patches = [ + # to use pycryptodme instead of pycrypto + ./pycryptodome.patch + ]; + 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 new file mode 100644 index 000000000000..665ad5980343 --- /dev/null +++ b/pkgs/development/python-modules/python-jose/pycryptodome.patch @@ -0,0 +1,37 @@ +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 |