From 4bb26cf7a17844158b1eacb156aaea012443cc6d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Sep 2022 16:45:57 +0200 Subject: [PATCH 1/4] python310Packages.typer: add optional-dependencies --- .../python-modules/typer/default.nix | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/typer/default.nix b/pkgs/development/python-modules/typer/default.nix index 2019a956ce54..35a946c6079b 100644 --- a/pkgs/development/python-modules/typer/default.nix +++ b/pkgs/development/python-modules/typer/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , buildPythonPackage +, colorama , fetchpatch , fetchPypi , flit-core @@ -23,7 +24,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "sha256-LVcgpeY/c+rzHtqhX2q4fzXwaQ+MojMBfX0j10OpHXM="; + hash = "sha256-LVcgpeY/c+rzHtqhX2q4fzXwaQ+MojMBfX0j10OpHXM="; }; nativeBuildInputs = [ @@ -34,14 +35,20 @@ buildPythonPackage rec { click ]; + passthru.optional-dependencies = { + all = [ + colorama + shellingham + rich + ]; + }; + checkInputs = [ - pytestCheckHook - pytest-xdist - pytest-sugar - shellingham - rich coverage # execs coverage in tests - ]; + pytest-sugar + pytest-xdist + pytestCheckHook + ] ++ passthru.optional-dependencies.all; preCheck = '' export HOME=$(mktemp -d); @@ -54,10 +61,12 @@ buildPythonPackage rec { "test_install_completion" ]; - pythonImportsCheck = [ "typer" ]; + pythonImportsCheck = [ + "typer" + ]; meta = with lib; { - description = "Python library for building CLI applications"; + description = "Library for building CLI applications"; homepage = "https://typer.tiangolo.com/"; license = licenses.mit; maintainers = with maintainers; [ winpat ]; From 3c009ec99894f6c0913fa7d91f5fdc4e65f9a371 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Sep 2022 16:49:19 +0200 Subject: [PATCH 2/4] python310Packages.pyunifiprotect: 4.2.0 -> 4.3.3 --- .../python-modules/pyunifiprotect/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pyunifiprotect/default.nix b/pkgs/development/python-modules/pyunifiprotect/default.nix index 03070e5a3374..60a010aa0b05 100644 --- a/pkgs/development/python-modules/pyunifiprotect/default.nix +++ b/pkgs/development/python-modules/pyunifiprotect/default.nix @@ -3,6 +3,7 @@ , aiohttp , aioshutil , buildPythonPackage +, dateparser , fetchFromGitHub , ipython , orjson @@ -27,7 +28,7 @@ buildPythonPackage rec { pname = "pyunifiprotect"; - version = "4.2.0"; + version = "4.3.3"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -36,13 +37,12 @@ buildPythonPackage rec { owner = "briis"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-DBOPHeSEdM6cev2BZs1AwXmzNPVsekNklu9c+KhECiI="; + hash = "sha256-77vBKca4S0XEa5O4ntuBW8uEwVig7IBH6BX3QEmvHWc="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace "--cov=pyunifiprotect --cov-append" "" - substituteInPlace setup.cfg \ + --replace "--cov=pyunifiprotect --cov-append" "" \ --replace "pydantic!=1.9.1" "pydantic" ''; @@ -50,6 +50,7 @@ buildPythonPackage rec { aiofiles aiohttp aioshutil + dateparser orjson packaging pillow @@ -57,7 +58,7 @@ buildPythonPackage rec { pyjwt pytz typer - ]; + ] ++ typer.optional-dependencies.all; passthru.optional-dependencies = { shell = [ From 58c774d72754472cc981b637664d40490bb5e641 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Sep 2022 17:58:59 +0200 Subject: [PATCH 3/4] python310Packages.rstcheck: 6.0.0.post1 -> 6.1.0 --- pkgs/development/python-modules/rstcheck/default.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/rstcheck/default.nix b/pkgs/development/python-modules/rstcheck/default.nix index b5a3ccefc08c..a3789b97088a 100644 --- a/pkgs/development/python-modules/rstcheck/default.nix +++ b/pkgs/development/python-modules/rstcheck/default.nix @@ -1,6 +1,5 @@ { lib , buildPythonPackage -, colorama , docutils , fetchFromGitHub , importlib-metadata @@ -9,7 +8,6 @@ , pytestCheckHook , pythonOlder , rstcheck-core -, shellingham , typer , types-docutils , typing-extensions @@ -17,7 +15,7 @@ buildPythonPackage rec { pname = "rstcheck"; - version = "6.0.0.post1"; + version = "6.1.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -26,7 +24,7 @@ buildPythonPackage rec { owner = "rstcheck"; repo = pname; rev = "v${version}"; - hash = "sha256-Ljg1cciT9qKL9xtBxQ8OLygDpV/1yR5XiJOzHrLr6xw="; + hash = "sha256-dw/KggiZpKaFZMcTIaSBUhR4oQsZI3iSmEj9Sy80wTs="; }; nativeBuildInputs = [ @@ -34,10 +32,8 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ - colorama docutils rstcheck-core - shellingham types-docutils typing-extensions pydantic @@ -45,7 +41,7 @@ buildPythonPackage rec { ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions importlib-metadata - ]; + ] ++ typer.optional-dependencies.all; checkInputs = [ pytestCheckHook @@ -53,6 +49,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ + --replace 'docutils = ">=0.7, <0.19"' 'docutils = ">=0.7"' \ --replace 'types-docutils = ">=0.18, <0.19"' 'types-docutils = ">=0.18"' ''; From 05d2c86f06bca6fb25f41a38e134a28c5ab66ebe Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Sep 2022 18:08:06 +0200 Subject: [PATCH 4/4] markdown-anki-decks: 1.0.0 -> 1.1.1 --- .../misc/markdown-anki-decks/default.nix | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/pkgs/tools/misc/markdown-anki-decks/default.nix b/pkgs/tools/misc/markdown-anki-decks/default.nix index 62c8ca86e6f0..d035c9db7317 100644 --- a/pkgs/tools/misc/markdown-anki-decks/default.nix +++ b/pkgs/tools/misc/markdown-anki-decks/default.nix @@ -4,13 +4,12 @@ python3.pkgs.buildPythonApplication rec { pname = "markdown-anki-decks"; - version = "1.0.0"; - + version = "1.1.1"; format = "pyproject"; src = python3.pkgs.fetchPypi { inherit pname version; - sha256 = "R6T8KOHMb1Neg/RG5JQl9+7LxOkAoZL0L5wvVaqm9O0="; + hash = "sha256-SvKjjE629OwxWsPo2egGf2K6GzlWAYYStarHhA4Ex0w="; }; nativeBuildInputs = with python3.pkgs; [ @@ -18,31 +17,30 @@ python3.pkgs.buildPythonApplication rec { ]; propagatedBuildInputs = with python3.pkgs; [ - genanki - typer - colorama - shellingham beautifulsoup4 + genanki markdown python-frontmatter - ]; + typer + ] ++ typer.optional-dependencies.all; postPatch = '' - # No API changes. substituteInPlace pyproject.toml \ - --replace 'python-frontmatter = "^0.5.0"' 'python-frontmatter = "^1.0.0"' \ - --replace 'genanki = "^0.10.1"' 'genanki = "*"' \ - --replace 'typer = "^0.3.2"' 'typer = "^0.4.0"' + --replace 'typer = "^0.4.0"' 'typer = "*"' ''; # No tests available on Pypi and there is only a failing version assertion test in the repo. doCheck = false; + pythonImportsCheck = [ + "markdown_anki_decks" + ]; + meta = with lib; { - description = "Simple program to convert markdown files into anki decks"; - maintainers = with maintainers; [ jtojnar ]; + description = "Tool to convert Markdown files into Anki Decks"; homepage = "https://github.com/lukesmurray/markdown-anki-decks"; license = licenses.mit; + maintainers = with maintainers; [ jtojnar ]; platforms = platforms.unix; }; }