diff options
Diffstat (limited to 'pkgs/development/python-modules/python-twitter/default.nix')
-rw-r--r-- | pkgs/development/python-modules/python-twitter/default.nix | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/python-twitter/default.nix b/pkgs/development/python-modules/python-twitter/default.nix index f6814a8d0fda7..79d262a8b02a9 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 ]; |