From 065fd414b5b4783842015072d655b188fd5a648a Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sun, 10 May 2020 11:45:08 -0700 Subject: [PATCH] python2Packages.oauthlib: freeze py2 at 3.1.0 python 2 supported ended on master --- .../python-modules/oauthlib/3.1.nix | 33 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 5 ++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/oauthlib/3.1.nix 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 00000000000..185ef974863 --- /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 56bdde7a307..4bd65c8944c 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 { };