git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.python-jose: init at 1.3.2
00addcbJörg Thalheim
pkgs/development/python-modules/python-jose/default.nixnew file+29
@@ -0,0 +1,29 @@
1+{ stdenv, buildPythonPackage, fetchFromGitHub
2+, future, six, ecdsa, pycryptodome, pytest
3+}:
4+
5+buildPythonPackage rec {
6+ name = "python-jose-${version}";
7+ version = "1.3.2";
8+ src = fetchFromGitHub {
9+ owner = "mpdavis";
10+ repo = "python-jose";
11+ rev = version;
12+ sha256 = "0933pbflv2pvws5m0ksz8y1fqr8m123smmrbr5k9a71nssd502sv";
13+ };
14+
15+ buildInputs = [ pytest ];
16+ checkPhase = "py.test .";
17+ patches = [
18+ # to use pycryptodme instead of pycrypto
19+ ./pycryptodome.patch
20+ ];
21+ propagatedBuildInputs = [ future six ecdsa pycryptodome ];
22+ meta = with stdenv.lib; {
23+ homepage = "https://github.com/mpdavis/python-jose";
24+ description = "A JOSE implementation in Python";
25+ platforms = platforms.all;
26+ license = licenses.mit;
27+ maintainers = [ maintainers.jhhuh ];
28+ };
29+}
pkgs/development/python-modules/python-jose/pycryptodome.patchnew file+37
@@ -0,0 +1,37 @@
1+diff -ru python-jose-1.3.2/requirements.txt python-jose-1.3.2.new/requirements.txt
2+--- python-jose-1.3.2/requirements.txt 2016-09-05 15:13:49.000000000 +0200
3++++ python-jose-1.3.2.new/requirements.txt 2017-03-15 11:35:47.118001810 +0100
4+@@ -1,3 +1,3 @@
5+-pycrypto
6++pycryptodome
7+ six
8+ future
9+diff -ru python-jose-1.3.2/setup.py python-jose-1.3.2.new/setup.py
10+--- python-jose-1.3.2/setup.py 2016-09-05 15:13:49.000000000 +0200
11++++ python-jose-1.3.2.new/setup.py 2017-03-15 11:37:15.725077184 +0100
12+@@ -25,12 +25,8 @@
13+
14+
15+ def get_install_requires():
16+- if platform.python_implementation() == 'PyPy':
17+- crypto_lib = 'pycryptodome >=3.3.1, <3.4.0'
18+- else:
19+- crypto_lib = 'pycrypto >=2.6.0, <2.7.0'
20+ return [
21+- crypto_lib,
22++ 'pycryptodome >=3.3.1, <3.5.0',
23+ 'six <2.0',
24+ 'ecdsa <1.0',
25+ 'future <1.0',
26+diff -ru python-jose-1.3.2/tox.ini python-jose-1.3.2.new/tox.ini
27+--- python-jose-1.3.2/tox.ini 2016-09-05 15:13:49.000000000 +0200
28++++ python-jose-1.3.2.new/tox.ini 2017-03-15 11:36:50.423055657 +0100
29+@@ -6,7 +6,7 @@
30+ py.test --cov-report term-missing --cov jose
31+ deps =
32+ future
33+- pycrypto
34++ pycryptodome
35+ ecdsa
36+ pytest
37+ pytest-cov
pkgs/top-level/python-packages.nix+2−1
@@ -5063,6 +5063,8 @@ in {
5063 };
5063 };
5064 };
5064 };
5065
5065
5066+ python-jose = callPackage ../development/python-modules/python-jose {};
5067+
5066 pyhepmc = buildPythonPackage rec {
5068 pyhepmc = buildPythonPackage rec {
5067 name = "pyhepmc-${version}";
5069 name = "pyhepmc-${version}";
5068 version = "0.5.0";
5070 version = "0.5.0";
@@ -19725,7 +19727,6 @@ in {
19725 };
19727 };
19726 };
19728 };
19727
19729
19728−
19729 Babel = buildPythonPackage (rec {
19730 Babel = buildPythonPackage (rec {
19730 name = "Babel-2.3.4";
19731 name = "Babel-2.3.4";
19731
19732