summary refs log tree commit diff
path: root/pkgs/development/python-modules/prawcore/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/prawcore/default.nix')
-rw-r--r--pkgs/development/python-modules/prawcore/default.nix44
1 files changed, 30 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/prawcore/default.nix b/pkgs/development/python-modules/prawcore/default.nix
index 3591476927c..6231ff2b812 100644
--- a/pkgs/development/python-modules/prawcore/default.nix
+++ b/pkgs/development/python-modules/prawcore/default.nix
@@ -1,27 +1,36 @@
 { lib
-, buildPythonPackage
-, fetchPypi
-, requests
-, testfixtures
-, mock
-, requests-toolbelt
 , betamax
-, betamax-serializers
 , betamax-matchers
+, betamax-serializers
+, buildPythonPackage
+, fetchFromGitHub
+, flit-core
+, mock
 , pytestCheckHook
 , pythonOlder
+, requests
+, requests-toolbelt
+, testfixtures
 }:
 
 buildPythonPackage rec {
   pname = "prawcore";
-  version = "2.3.0";
-  disabled = pythonOlder "3.6";
+  version = "2.4.0";
+  pyproject = true;
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "0vgmhjddqxnz5vy70dyqvakak51fg1nk6j3xavkc83d8nzacrwfs";
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromGitHub {
+    owner = "praw-dev";
+    repo = "prawcore";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-tECZRx6VgyiJDKHvj4Rf1sknFqUhz3sDFEsAMOeB7/g=";
   };
 
+  nativeBuildInputs = [
+    flit-core
+  ];
+
   propagatedBuildInputs = [
     requests
   ];
@@ -36,13 +45,20 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
-  pythonImportsCheck = [ "prawcore" ];
+  disabledTestPaths = [
+    # tests requiring network
+    "tests/integration"
+  ];
+
+  pythonImportsCheck = [
+    "prawcore"
+  ];
 
   meta = with lib; {
     description = "Low-level communication layer for PRAW";
     homepage = "https://praw.readthedocs.org/";
+    changelog = "https://github.com/praw-dev/prawcore/blob/v${version}/CHANGES.rst";
     license = licenses.bsd2;
-    platforms = platforms.all;
     maintainers = with maintainers; [ fab ];
   };
 }