diff --git a/pkgs/development/python-modules/oauthlib/3.1.nix b/pkgs/development/python-modules/oauthlib/3.1.nix new file mode 100644 index 000000000000..185ef9748637 --- /dev/null +++ b/pkgs/development/python-modules/oauthlib/3.1.nix @@ -0,0 +1,33 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, mock +, pytest +, cryptography +, blinker +, pyjwt +}: + +buildPythonPackage rec { + pname = "oauthlib"; + version = "3.1.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889"; + }; + + checkInputs = [ mock pytest ]; + propagatedBuildInputs = [ cryptography blinker pyjwt ]; + + checkPhase = '' + py.test tests/ + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/idan/oauthlib"; + description = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic"; + maintainers = with maintainers; [ prikhi ]; + license = licenses.bsd3; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 56bdde7a307e..4bd65c8944cb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4762,7 +4762,10 @@ in { oauth2client = callPackage ../development/python-modules/oauth2client { }; - oauthlib = callPackage ../development/python-modules/oauthlib { }; + oauthlib = if isPy27 then + callPackage ../development/python-modules/oauthlib/3.1.nix { } + else + callPackage ../development/python-modules/oauthlib { }; obfsproxy = callPackage ../development/python-modules/obfsproxy { };