python312Packages.keep: refactor (#354697)

This commit is contained in:
Fabian Affolter 2024-11-15 08:47:31 +01:00 committed by GitHub
commit 9087c296b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 79 additions and 15 deletions

View File

@ -1,40 +1,44 @@
{
lib,
buildPythonPackage,
fetchPypi,
pygithub,
terminaltables,
click,
fetchPypi,
flit-core,
pygithub,
requests,
terminaltables3,
}:
buildPythonPackage rec {
pname = "keep";
version = "2.11";
format = "setuptools";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Brwvu/Zevr8sOE3KAwakDDzVMc2VoFxIb1orXAes2U0=";
hash = "sha256-Brwvu/Zevr8sOE3KAwakDDzVMc2VoFxIb1orXAes2U0=";
};
propagatedBuildInputs = [
build-system = [ flit-core ];
dependencies = [
click
requests
terminaltables
pygithub
requests
terminaltables3
];
# no tests
# Module no tests
doCheck = false;
pythonImportsCheck = [ "keep" ];
meta = with lib; {
homepage = "https://github.com/orkohunter/keep";
description = "Meta CLI toolkit: Personal shell command keeper and snippets manager";
meta = {
description = "Meta CLI toolkit to keep personal shell command keeper and manage snippets";
homepage = "https://github.com/OrkoHunter/keep";
changelog = "https://github.com/OrkoHunter/keep/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ris ];
mainProgram = "keep";
platforms = platforms.all;
license = licenses.mit;
maintainers = with maintainers; [ ris ];
};
}

View File

@ -0,0 +1,58 @@
{
lib,
buildPythonPackage,
colorama,
colorclass,
fetchFromGitHub,
poetry-core,
pytest-cov-stub,
pytest-xdist,
pytestCheckHook,
pythonOlder,
termcolor,
}:
buildPythonPackage rec {
pname = "terminaltables3";
version = "4.0.0-unstable-2024-07-21";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "matthewdeanmartin";
repo = "terminaltables3";
#rev = "refs/tags/v${version}";
rev = "f1c465b36eb9b91a984d8864b21376e7c37075b8";
hash = "sha256-UcEovh1Eb4QNPwLGDjCphPlJSSkOdhCJ2fK3tuSWOTc=";
};
build-system = [ poetry-core ];
nativeCheckInputs = [
colorama
colorclass
pytest-cov-stub
pytest-xdist
pytestCheckHook
termcolor
];
pythonImportsCheck = [ "terminaltables3" ];
disabledTests = [
# Tests are comparing CLI output
"test_color"
"test_colors"
"test_height"
"test_width"
];
meta = {
description = "Generate simple tables in terminals from a nested list of strings";
homepage = "https://github.com/matthewdeanmartin/terminaltables3";
changelog = "https://github.com/matthewdeanmartin/terminaltables3/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}

View File

@ -15704,6 +15704,8 @@ self: super: with self; {
terminaltables = callPackage ../development/python-modules/terminaltables { };
terminaltables3 = callPackage ../development/python-modules/terminaltables3 { };
terminaltexteffects = callPackage ../development/python-modules/terminaltexteffects { };
termplotlib = callPackage ../development/python-modules/termplotlib { };