about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2024-04-16 13:43:00 +0200
committerGitHub <noreply@github.com>2024-04-16 13:43:00 +0200
commita0d9c0f6987fa9955a756cd4ea6eb0af09c3b021 (patch)
tree5c0a0f8f9c28e7a94cf7d14d8a5af665bb6dc2f1 /pkgs
parent40e869014dbd2383ceed21d4a6f0029324ae53cb (diff)
parenta1ecc99f102f5dd1046c22db2f3c017f183d3211 (diff)
Merge pull request #304499 from fabaff/validate-email-refactor
python312Packages.validate-email: refactor, python312Packages.toggl-cli: 2.4.3 -> 2.4.4
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/toggl-cli/default.nix79
-rw-r--r--pkgs/development/python-modules/validate-email/default.nix22
2 files changed, 56 insertions, 45 deletions
diff --git a/pkgs/development/python-modules/toggl-cli/default.nix b/pkgs/development/python-modules/toggl-cli/default.nix
index 92481399143de..8e221c312bae0 100644
--- a/pkgs/development/python-modules/toggl-cli/default.nix
+++ b/pkgs/development/python-modules/toggl-cli/default.nix
@@ -1,49 +1,59 @@
-{ lib
-, buildPythonPackage
-, click
-, click-completion
-, factory-boy
-, faker
-, fetchPypi
-, inquirer
-, notify-py
-, pbr
-, pendulum
-, ptable
-, pytest-mock
-, pytestCheckHook
-, pythonOlder
-, requests
-, twine
-, validate-email
+{
+  lib,
+  buildPythonPackage,
+  click,
+  click-completion,
+  factory-boy,
+  faker,
+  fetchPypi,
+  inquirer,
+  notify-py,
+  pbr,
+  pendulum,
+  prettytable,
+  pytest-mock,
+  pytestCheckHook,
+  pythonOlder,
+  requests,
+  setuptools,
+  twine,
+  validate-email,
 }:
 
 buildPythonPackage rec {
   pname = "toggl-cli";
-  version = "2.4.3";
-  format = "setuptools";
+  version = "2.4.4";
+  pyproject = true;
 
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     pname = "togglCli";
     inherit version;
-    hash = "sha256-ncMwiMwYivaFu5jrAsm1oCuXP/PZ2ALT+M+CmV6dtFo=";
+    hash = "sha256-P4pv6LMPIWXD04IQw01yo3z3voeV4OmsBOCSJgcrZ6g=";
   };
 
-  nativeBuildInputs = [
+  postPatch = ''
+    substituteInPlace requirements.txt \
+      --replace-fail "==" ">="
+    substituteInPlace pytest.ini \
+      --replace ' --cov toggl -m "not premium"' ""
+  '';
+
+  build-system = [
     pbr
+    setuptools
     twine
   ];
 
-  propagatedBuildInputs = [
+  dependencies = [
     click
     click-completion
     inquirer
     notify-py
     pbr
     pendulum
-    ptable
+    prettytable
     requests
     validate-email
   ];
@@ -55,16 +65,6 @@ buildPythonPackage rec {
     factory-boy
   ];
 
-  postPatch = ''
-    substituteInPlace requirements.txt \
-      --replace "notify-py==0.3.3" "notify-py>=0.3.3" \
-      --replace "click==8.0.3" "click>=8.0.3" \
-      --replace "pbr==5.8.0" "pbr>=5.8.0" \
-      --replace "inquirer==2.9.1" "inquirer>=2.9.1"
-    substituteInPlace pytest.ini \
-      --replace ' --cov toggl -m "not premium"' ""
-  '';
-
   preCheck = ''
     export TOGGL_API_TOKEN=your_api_token
     export TOGGL_PASSWORD=toggl_password
@@ -74,23 +74,22 @@ buildPythonPackage rec {
   disabledTests = [
     "integration"
     "premium"
+    "test_basic_usage"
+    "test_now"
     "test_parsing"
     "test_type_check"
-    "test_now"
   ];
 
-  pythonImportsCheck = [
-    "toggl"
-  ];
+  pythonImportsCheck = [ "toggl" ];
 
   # updates to a bogus tag
   passthru.skipBulkUpdate = true;
 
   meta = with lib; {
     description = "Command line tool and set of Python wrapper classes for interacting with toggl's API";
-    mainProgram = "toggl";
     homepage = "https://toggl.uhlir.dev/";
     license = licenses.mit;
     maintainers = with maintainers; [ mmahut ];
+    mainProgram = "toggl";
   };
 }
diff --git a/pkgs/development/python-modules/validate-email/default.nix b/pkgs/development/python-modules/validate-email/default.nix
index 1c8e8d3c384a0..441a0671461c9 100644
--- a/pkgs/development/python-modules/validate-email/default.nix
+++ b/pkgs/development/python-modules/validate-email/default.nix
@@ -1,23 +1,35 @@
-{ lib, buildPythonPackage, fetchPypi }:
+{
+  lib,
+  buildPythonPackage,
+  fetchPypi,
+  pythonOlder,
+  setuptools,
+}:
 
 buildPythonPackage rec {
   pname = "validate-email";
   version = "1.3";
-  format = "setuptools";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit version;
     pname = "validate_email";
-    sha256 = "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq";
+    hash = "sha256-eEcZ3F94C+MZzdGF3IXdk6/r2267lDgRvEx8X5xyrq8=";
   };
 
+  build-system = [ setuptools ];
+
   # No tests
   doCheck = false;
 
+  pythonImportsCheck = [ "validate_email" ];
+
   meta = with lib; {
-    homepage = "https://github.com/syrusakbary/validate_email";
     description = "Verify if an email address is valid and really exists";
+    homepage = "https://github.com/syrusakbary/validate_email";
     license = licenses.lgpl3Plus;
-    maintainers = [ maintainers.mmahut ];
+    maintainers = with maintainers; [ mmahut ];
   };
 }