Merge pull request #205571 from fabaff/todoist

python310Packages.todoist-api-python: init at 2.0.2
This commit is contained in:
Fabian Affolter 2022-12-12 09:15:57 +01:00 committed by GitHub
commit ba0a8eb7ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 82 additions and 5 deletions

View file

@ -0,0 +1,63 @@
{ lib
, attrs
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, poetry-core
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, requests
, responses
}:
buildPythonPackage rec {
pname = "todoist-api-python";
version = "2.0.2";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Doist";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-CKOsUb35+7WjSNf4Xo0SK5loIqWJbEnHdmhw9QXWFAI=";
};
patches = [
# Switch to poetry-core, https://github.com/Doist/todoist-api-python/pull/81
(fetchpatch {
name = "switch-to-poetry-core.patch";
url = "https://github.com/Doist/todoist-api-python/commit/42288e066d2f0c69611ab50cb57ca98b8c6bd1ca.patch";
sha256 = "sha256-yq+VVvjPYywvUn+ydyWVQPkiYPYWe9U6w38G54L2lkE=";
})
];
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
attrs
requests
];
checkInputs = [
pytest-asyncio
pytestCheckHook
responses
];
pythonImportsCheck = [
"todoist_api_python"
];
meta = with lib; {
description = "Library for the Todoist REST API";
homepage = "https://github.com/Doist/todoist-api-python";
changelog = "https://github.com/Doist/todoist-api-python/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -1,21 +1,33 @@
{ lib, fetchPypi, buildPythonPackage
, requests, pythonOlder, typing
{ lib
, fetchPypi
, buildPythonPackage
, requests
, pythonOlder
}:
buildPythonPackage rec {
pname = "todoist-python";
version = "8.1.3";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-AFRKA5VRD6jyiguZYP7WOQOWqHq1GjUzbuez0f1070U=";
hash = "sha256-AFRKA5VRD6jyiguZYP7WOQOWqHq1GjUzbuez0f1070U=";
};
propagatedBuildInputs = [ requests ] ++ lib.optional (pythonOlder "3.5") typing;
propagatedBuildInputs = [
requests
];
pythonImportsCheck = [
"todoist"
];
meta = with lib; {
description = "The official Todoist Python API library";
homepage = "https://todoist-python.readthedocs.io/en/latest/";
homepage = "https://todoist-python.readthedocs.io/";
license = licenses.mit;
maintainers = with maintainers; [ ];
};

View file

@ -11219,6 +11219,8 @@ self: super: with self; {
todoist = callPackage ../development/python-modules/todoist { };
todoist-api-python = callPackage ../development/python-modules/todoist-api-python { };
toggl-cli = callPackage ../development/python-modules/toggl-cli { };
token-bucket = callPackage ../development/python-modules/token-bucket { };