mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-16 15:28:19 +00:00
python312Packages.toggl-cli: 2.4.4 -> 3.0.2 (#361814)
This commit is contained in:
commit
b800933dce
@ -1,45 +1,45 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
click,
|
||||
click-completion,
|
||||
factory-boy,
|
||||
faker,
|
||||
fetchPypi,
|
||||
inquirer,
|
||||
notify-py,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
pbr,
|
||||
pendulum,
|
||||
prettytable,
|
||||
pytest-mock,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
pythonOlder,
|
||||
requests,
|
||||
setuptools,
|
||||
twine,
|
||||
|
||||
# dependencies
|
||||
click,
|
||||
click-completion,
|
||||
inquirer,
|
||||
notify-py,
|
||||
pendulum,
|
||||
prettytable,
|
||||
requests,
|
||||
validate-email,
|
||||
|
||||
# tests
|
||||
factory-boy,
|
||||
pytest-cov-stub,
|
||||
pytest-mock,
|
||||
pytestCheckHook,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "toggl-cli";
|
||||
version = "2.4.4";
|
||||
version = "3.0.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "togglCli";
|
||||
inherit version;
|
||||
hash = "sha256-P4pv6LMPIWXD04IQw01yo3z3voeV4OmsBOCSJgcrZ6g=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "AuHau";
|
||||
repo = "toggl-cli";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-RYOnlZxg3TZQO5JpmWlnUdL2hNFu4bjkdGU4c2ysqpA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt \
|
||||
--replace-fail "==" ">="
|
||||
substituteInPlace pytest.ini \
|
||||
--replace-fail ' -m "not premium"' ""
|
||||
'';
|
||||
env.PBR_VERSION = version;
|
||||
|
||||
build-system = [
|
||||
pbr
|
||||
@ -47,6 +47,8 @@ buildPythonPackage rec {
|
||||
twine
|
||||
];
|
||||
|
||||
pythonRelaxDeps = true;
|
||||
|
||||
dependencies = [
|
||||
click
|
||||
click-completion
|
||||
@ -56,42 +58,41 @@ buildPythonPackage rec {
|
||||
pendulum
|
||||
prettytable
|
||||
requests
|
||||
setuptools
|
||||
validate-email
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
factory-boy
|
||||
pytest-cov-stub
|
||||
pytest-mock
|
||||
faker
|
||||
factory-boy
|
||||
pytestCheckHook
|
||||
versionCheckHook
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export TOGGL_API_TOKEN=your_api_token
|
||||
export TOGGL_PASSWORD=toggl_password
|
||||
export TOGGL_USERNAME=user@example.com
|
||||
'';
|
||||
versionCheckProgram = "${placeholder "out"}/bin/toggl";
|
||||
versionCheckProgramArg = [ "--version" ];
|
||||
|
||||
disabledTests = [
|
||||
"integration"
|
||||
"premium"
|
||||
"test_basic_usage"
|
||||
"test_now"
|
||||
"test_parsing"
|
||||
"test_type_check"
|
||||
];
|
||||
|
||||
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# PermissionError: [Errno 1] Operation not permitted: '/etc/localtime'
|
||||
"tests/unit/cli/test_types.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "toggl" ];
|
||||
|
||||
# updates to a bogus tag
|
||||
passthru.skipBulkUpdate = true;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Command line tool and set of Python wrapper classes for interacting with toggl's API";
|
||||
homepage = "https://toggl.uhlir.dev/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mmahut ];
|
||||
changelog = "https://github.com/AuHau/toggl-cli/releases/tag/v${version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ mmahut ];
|
||||
mainProgram = "toggl";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user