From 52f97ffab2bb2c67402728ddaff3bf0431f1a63a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 25 Feb 2022 13:37:54 +0100 Subject: python3Packages.python-twitter: rename requests-oauthlib --- .../python-modules/python-twitter/default.nix | 39 +++++++++++++++++----- 1 file changed, 30 insertions(+), 9 deletions(-) (limited to 'pkgs/development/python-modules/python-twitter') diff --git a/pkgs/development/python-modules/python-twitter/default.nix b/pkgs/development/python-modules/python-twitter/default.nix index f6814a8d0fda..79d262a8b02a 100644 --- a/pkgs/development/python-modules/python-twitter/default.nix +++ b/pkgs/development/python-modules/python-twitter/default.nix @@ -2,20 +2,23 @@ , buildPythonPackage , fetchFromGitHub , fetchpatch -, pytest-runner +, filetype , future +, hypothesis +, pytestCheckHook +, pythonOlder , requests +, requests-oauthlib , responses -, requests_oauthlib -, pytest -, hypothesis }: buildPythonPackage rec { pname = "python-twitter"; version = "3.5"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; - # No tests in PyPi Tarball src = fetchFromGitHub { owner = "bear"; repo = pname; @@ -31,12 +34,30 @@ buildPythonPackage rec { }) ]; - nativeBuildInputs = [ pytest-runner ]; - propagatedBuildInputs = [ future requests requests_oauthlib ]; - checkInputs = [ pytest responses hypothesis ]; + propagatedBuildInputs = [ + filetype + future + requests + requests-oauthlib + ]; + + checkInputs = [ + pytestCheckHook + responses + hypothesis + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace "'pytest-runner'" "" + ''; + + pythonImportsCheck = [ + "twitter" + ]; meta = with lib; { - description = "A Python wrapper around the Twitter API"; + description = "Python wrapper around the Twitter API"; homepage = "https://github.com/bear/python-twitter"; license = licenses.asl20; maintainers = [ maintainers.marsam ]; -- cgit v1.2.3