From 33db0f7686313d27e24a3028020be7cb8b5232b1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 1 Feb 2021 23:24:49 +0100 Subject: [PATCH 1/4] python3Packages.watchdog: 0.10.4 -> 1.0.2 --- pkgs/development/python-modules/watchdog/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/watchdog/default.nix b/pkgs/development/python-modules/watchdog/default.nix index 5cb8929b9db..b077b48493e 100644 --- a/pkgs/development/python-modules/watchdog/default.nix +++ b/pkgs/development/python-modules/watchdog/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "watchdog"; - version = "0.10.4"; + version = "1.0.2"; src = fetchPypi { inherit pname version; - sha256 = "e38bffc89b15bafe2a131f0e1c74924cf07dcec020c2e0a26cccd208831fcd43"; + sha256 = "sha256-N2y8KjXAOSsP5/8W+8GzA/2Z1N2ZEatVge6daa3IiYI="; }; buildInputs = lib.optionals stdenv.isDarwin From 44afe6bba161821ad2bb607e267f19565f7b2836 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 1 Feb 2021 23:32:12 +0100 Subject: [PATCH 2/4] python3Packages.watchdog: enable tests --- .../python-modules/watchdog/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/watchdog/default.nix b/pkgs/development/python-modules/watchdog/default.nix index b077b48493e..693cfcce926 100644 --- a/pkgs/development/python-modules/watchdog/default.nix +++ b/pkgs/development/python-modules/watchdog/default.nix @@ -5,6 +5,8 @@ , pathtools , pyyaml , pkgs +, pytest-cov +, pytestCheckHook }: buildPythonPackage rec { @@ -18,9 +20,19 @@ buildPythonPackage rec { buildInputs = lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.CoreServices ]; - propagatedBuildInputs = [ argh pathtools pyyaml ]; - doCheck = false; + propagatedBuildInputs = [ + argh + pathtools + pyyaml + ]; + + checkInputs = [ + pytest-cov + pytestCheckHook + ]; + + pythonImportsCheck = [ "watchdog" ]; meta = with lib; { description = "Python API and shell utilities to monitor file system events"; From 9c06d17d95d928baac02d4bf862e7404d369660d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 2 Feb 2021 09:02:18 +0100 Subject: [PATCH 3/4] python3Packages.coconut: switch to pytestCheckHook --- .../python-modules/coconut/default.nix | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/coconut/default.nix b/pkgs/development/python-modules/coconut/default.nix index b75a82b6c2b..966546a7775 100644 --- a/pkgs/development/python-modules/coconut/default.nix +++ b/pkgs/development/python-modules/coconut/default.nix @@ -1,17 +1,15 @@ -{ - lib, - buildPythonApplication, - fetchFromGitHub, - fetchpatch, - - cpyparsing, - ipykernel, - mypy, - pygments, - pytest, - prompt_toolkit, - tkinter, - watchdog +{ lib +, buildPythonApplication +, fetchFromGitHub +, fetchpatch +, cpyparsing +, ipykernel +, mypy +, pygments +, pytestCheckHook +, prompt_toolkit +, tkinter +, watchdog }: buildPythonApplication rec { @@ -35,13 +33,19 @@ buildPythonApplication rec { }) ]; - checkInputs = [ pytest tkinter ]; + checkInputs = [ + pytestCheckHook + tkinter + ]; + # Currently most tests do not work on Hydra due to external fetches. - checkPhase = '' - pytest tests/constants_test.py - pytest tests/main_test.py::TestShell::test_compile_to_file - pytest tests/main_test.py::TestShell::test_convenience - ''; + pytestFlagsArray = [ + "tests/constants_test.py" + "tests/main_test.py::TestShell::test_compile_to_file" + "tests/main_test.py::TestShell::test_convenience" + ]; + + pythonImportsCheck = [ "coconut" ]; meta = with lib; { homepage = "http://coconut-lang.org/"; From c0638b8591d1ef8360d45eea0159740156a8ceb8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 2 Feb 2021 09:43:21 +0100 Subject: [PATCH 4/4] python3Packages.coconut: add patch to fix build issue --- pkgs/development/python-modules/coconut/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/coconut/default.nix b/pkgs/development/python-modules/coconut/default.nix index 966546a7775..55eadddaa1d 100644 --- a/pkgs/development/python-modules/coconut/default.nix +++ b/pkgs/development/python-modules/coconut/default.nix @@ -31,6 +31,11 @@ buildPythonApplication rec { url = "https://github.com/LibreCybernetics/coconut/commit/2916a087da1e063cc4438b68d4077347fd1ea4a2.patch"; sha256 = "136jbd2rvnifw30y73vv667002nf7sbkm5qyihshj4db7ngysr6q"; }) + (fetchpatch { + name = "support-python-3.9.patch"; + url = "https://github.com/evhub/coconut/commit/5c724b4dd92fb62c614d8192e3cac3dd1d475790.patch"; + sha256 = "04xmzyfmyv6gr2l2z6pdxlllwzcmwxvahxzqyxglr36hfl33ad71"; + }) ]; checkInputs = [