about summary refs log tree commit diff
path: root/pkgs/development/python-modules/woob/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/woob/default.nix')
-rw-r--r--pkgs/development/python-modules/woob/default.nix49
1 files changed, 31 insertions, 18 deletions
diff --git a/pkgs/development/python-modules/woob/default.nix b/pkgs/development/python-modules/woob/default.nix
index fc5e6e9dc65bf..3c9529c2644bd 100644
--- a/pkgs/development/python-modules/woob/default.nix
+++ b/pkgs/development/python-modules/woob/default.nix
@@ -1,12 +1,10 @@
 { lib
-, buildPythonPackage
-, fetchPypi
-, isPy27
 , Babel
+, buildPythonPackage
 , colorama
 , cssselect
-, python-dateutil
 , feedparser
+, fetchFromGitLab
 , gdata
 , gnupg
 , google-api-python-client
@@ -19,6 +17,8 @@
 , pillow
 , prettytable
 , pyqt5
+, python-dateutil
+, pythonOlder
 , pyyaml
 , requests
 , simplejson
@@ -29,22 +29,21 @@
 buildPythonPackage rec {
   pname = "woob";
   version = "3.0";
-  disabled = isPy27;
+  format = "setuptools";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "09hpxy5zhn2b8li0xjf3zd7s46lawb0315p5mdcsci3bj3s4v1j7";
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitLab {
+    owner = "woob";
+    repo = pname;
+    rev = version;
+    hash = "sha256-XLcHNidclORbxVXgcsHY6Ja/dak+EVSKTaVQmg1f/rw=";
   };
 
-  patches = [
-    # Disable doctests that require networking:
-    ./no-test-requiring-network.patch
+  nativeBuildInputs = [
+    pyqt5
   ];
 
-  checkInputs = [ nose ];
-
-  nativeBuildInputs = [ pyqt5 ];
-
   propagatedBuildInputs = [
     Babel
     colorama
@@ -69,14 +68,28 @@ buildPythonPackage rec {
     unidecode
   ];
 
+  postPatch = ''
+    substituteInPlace setup.cfg \
+      --replace "with-doctest = 1" "" \
+      --replace "with-coverage = 1" ""
+  '';
+
+  checkInputs = [
+    nose
+  ];
+
   checkPhase = ''
     nosetests
   '';
 
+  pythonImportsCheck = [
+    "woob"
+  ];
+
   meta = with lib; {
+    description = "Collection of applications and APIs to interact with websites";
     homepage = "https://woob.tech";
-    description = "Collection of applications and APIs to interact with websites without requiring the user to open a browser";
     license = licenses.lgpl3Plus;
-    maintainers = [ maintainers.DamienCassou ];
- };
+    maintainers = with maintainers; [ DamienCassou ];
+  };
 }