Merge pull request #304499 from fabaff/validate-email-refactor

python312Packages.validate-email: refactor, python312Packages.toggl-cli: 2.4.3 -> 2.4.4
This commit is contained in:
Fabian Affolter 2024-04-16 13:43:00 +02:00 committed by GitHub
commit a0d9c0f698
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 56 additions and 45 deletions

View File

@ -1,49 +1,59 @@
{ lib {
, buildPythonPackage lib,
, click buildPythonPackage,
, click-completion click,
, factory-boy click-completion,
, faker factory-boy,
, fetchPypi faker,
, inquirer fetchPypi,
, notify-py inquirer,
, pbr notify-py,
, pendulum pbr,
, ptable pendulum,
, pytest-mock prettytable,
, pytestCheckHook pytest-mock,
, pythonOlder pytestCheckHook,
, requests pythonOlder,
, twine requests,
, validate-email setuptools,
twine,
validate-email,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "toggl-cli"; pname = "toggl-cli";
version = "2.4.3"; version = "2.4.4";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
pname = "togglCli"; pname = "togglCli";
inherit version; 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 pbr
setuptools
twine twine
]; ];
propagatedBuildInputs = [ dependencies = [
click click
click-completion click-completion
inquirer inquirer
notify-py notify-py
pbr pbr
pendulum pendulum
ptable prettytable
requests requests
validate-email validate-email
]; ];
@ -55,16 +65,6 @@ buildPythonPackage rec {
factory-boy 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 = '' preCheck = ''
export TOGGL_API_TOKEN=your_api_token export TOGGL_API_TOKEN=your_api_token
export TOGGL_PASSWORD=toggl_password export TOGGL_PASSWORD=toggl_password
@ -74,23 +74,22 @@ buildPythonPackage rec {
disabledTests = [ disabledTests = [
"integration" "integration"
"premium" "premium"
"test_basic_usage"
"test_now"
"test_parsing" "test_parsing"
"test_type_check" "test_type_check"
"test_now"
]; ];
pythonImportsCheck = [ pythonImportsCheck = [ "toggl" ];
"toggl"
];
# updates to a bogus tag # updates to a bogus tag
passthru.skipBulkUpdate = true; passthru.skipBulkUpdate = true;
meta = with lib; { meta = with lib; {
description = "Command line tool and set of Python wrapper classes for interacting with toggl's API"; description = "Command line tool and set of Python wrapper classes for interacting with toggl's API";
mainProgram = "toggl";
homepage = "https://toggl.uhlir.dev/"; homepage = "https://toggl.uhlir.dev/";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ mmahut ]; maintainers = with maintainers; [ mmahut ];
mainProgram = "toggl";
}; };
} }

View File

@ -1,23 +1,35 @@
{ lib, buildPythonPackage, fetchPypi }: {
lib,
buildPythonPackage,
fetchPypi,
pythonOlder,
setuptools,
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "validate-email"; pname = "validate-email";
version = "1.3"; version = "1.3";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit version; inherit version;
pname = "validate_email"; pname = "validate_email";
sha256 = "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"; hash = "sha256-eEcZ3F94C+MZzdGF3IXdk6/r2267lDgRvEx8X5xyrq8=";
}; };
build-system = [ setuptools ];
# No tests # No tests
doCheck = false; doCheck = false;
pythonImportsCheck = [ "validate_email" ];
meta = with lib; { meta = with lib; {
homepage = "https://github.com/syrusakbary/validate_email";
description = "Verify if an email address is valid and really exists"; description = "Verify if an email address is valid and really exists";
homepage = "https://github.com/syrusakbary/validate_email";
license = licenses.lgpl3Plus; license = licenses.lgpl3Plus;
maintainers = [ maintainers.mmahut ]; maintainers = with maintainers; [ mmahut ];
}; };
} }