about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/tweepy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/tweepy/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/tweepy/default.nix44
1 files changed, 36 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/tweepy/default.nix b/nixpkgs/pkgs/development/python-modules/tweepy/default.nix
index dd11e60aff6c..a98911da58d5 100644
--- a/nixpkgs/pkgs/development/python-modules/tweepy/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/tweepy/default.nix
@@ -1,20 +1,48 @@
-{ lib, buildPythonPackage, fetchPypi, requests, six, requests_oauthlib }:
+{ lib
+, aiohttp
+, buildPythonPackage
+, fetchFromGitHub
+, oauthlib
+, requests
+, pythonOlder
+, vcrpy
+, pytestCheckHook
+, requests_oauthlib
+}:
 
 buildPythonPackage rec {
   pname = "tweepy";
-  version = "3.10.0";
+  version = "4.4.0";
+  format = "setuptools";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "76e6954b806ca470dda877f57db8792fff06a0beba0ed43efc3805771e39f06a";
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-GUo8uvShyIOWWcO5T1JvV7DMC1W70YILx/hvHIGQg0o=";
   };
 
-  doCheck = false;
-  propagatedBuildInputs = [ requests six requests_oauthlib ];
+  propagatedBuildInputs = [
+    aiohttp
+    oauthlib
+    requests
+    requests_oauthlib
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    vcrpy
+  ];
+
+  pythonImportsCheck = [
+    "tweepy"
+  ];
 
   meta = with lib; {
     homepage = "https://github.com/tweepy/tweepy";
-    description = "Twitter library for python";
+    description = "Twitter library for Python";
     license = licenses.mit;
     maintainers = with maintainers; [ ];
   };