From f8c2f7583adaaca8ba1d1473db490781687235c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 8 Jan 2021 19:08:46 +0100 Subject: [PATCH 01/23] pythonPackages.scrapy-deltafetch: Disable tests --- .../python-modules/scrapy-deltafetch/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scrapy-deltafetch/default.nix b/pkgs/development/python-modules/scrapy-deltafetch/default.nix index 090d31e67a9..900943a0e15 100644 --- a/pkgs/development/python-modules/scrapy-deltafetch/default.nix +++ b/pkgs/development/python-modules/scrapy-deltafetch/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchPypi, buildPythonPackage, pytest, scrapy, bsddb3 }: +{ stdenv, lib, fetchPypi, buildPythonPackage, scrapy, bsddb3 }: buildPythonPackage rec { pname = "scrapy-deltafetch"; @@ -11,7 +11,9 @@ buildPythonPackage rec { propagatedBuildInputs = [ bsddb3 scrapy ]; - checkInputs = [ pytest ]; + # no tests + doCheck = false; + pythonImportsCheck = [ "scrapy_deltafetch" ]; meta = with lib; { description = "Scrapy spider middleware to ignore requests to pages containing items seen in previous crawls"; From 1d12368d30b1c75a514dbd47d1d2330f66286b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 8 Jan 2021 19:09:01 +0100 Subject: [PATCH 02/23] pythonPackages.scrapy-splash: Fix dependencies, disable tests --- pkgs/development/python-modules/scrapy-splash/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scrapy-splash/default.nix b/pkgs/development/python-modules/scrapy-splash/default.nix index 48988be2c0a..ab00377f4a0 100644 --- a/pkgs/development/python-modules/scrapy-splash/default.nix +++ b/pkgs/development/python-modules/scrapy-splash/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchPypi, buildPythonPackage, pytest, hypothesis, scrapy }: +{ stdenv, lib, fetchPypi, buildPythonPackage, scrapy, six }: buildPythonPackage rec { pname = "scrapy-splash"; @@ -9,7 +9,11 @@ buildPythonPackage rec { sha256 = "1dg7csdza2hzqskd9b9gx0v3saqsch4f0fwdp0a3p0822aqqi488"; }; - checkInputs = [ pytest hypothesis scrapy ]; + propagatedBuildInputs = [ scrapy six ]; + + # no tests + doCheck = false; + pythonImportsCheck = [ "scrapy_splash" ]; meta = with lib; { description = "Scrapy+Splash for JavaScript integration"; From 733db112075d7ba3bfcd637d5269732076dcf0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 8 Jan 2021 22:34:20 +0100 Subject: [PATCH 03/23] python3Packages.keep: Disable check phase --- pkgs/development/python-modules/keep/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/keep/default.nix b/pkgs/development/python-modules/keep/default.nix index 52fc90a3ca9..22ae853c043 100644 --- a/pkgs/development/python-modules/keep/default.nix +++ b/pkgs/development/python-modules/keep/default.nix @@ -24,6 +24,7 @@ buildPythonPackage rec { ]; # no tests + doCheck = false; pythonImportsCheck = [ "keep" ]; meta = with lib; { From b795b57bcec51a521d2967ce5d642d0cca3e9617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 8 Jan 2021 22:37:57 +0100 Subject: [PATCH 04/23] python3Packages.swspotify: Fix dependencies --- pkgs/development/python-modules/swspotify/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/swspotify/default.nix b/pkgs/development/python-modules/swspotify/default.nix index 30f34c56c81..321a48e72b6 100644 --- a/pkgs/development/python-modules/swspotify/default.nix +++ b/pkgs/development/python-modules/swspotify/default.nix @@ -18,7 +18,8 @@ buildPythonPackage rec { preConfigure = '' substituteInPlace setup.py \ - --replace 'requests>=2.24.0' 'requests~=2.23' + --replace 'requests>=2.24.0' 'requests~=2.23' \ + --replace 'flask-cors==3.0.8' 'flask-cors' ''; checkPhase = '' @@ -27,6 +28,8 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook mock ]; + pythonImportsCheck = [ "SwSpotify" ]; + meta = with lib; { homepage = "https://github.com/SwagLyrics/SwSpotify"; description = "Library to get the currently playing song and artist from Spotify"; From 7ed180f6261a0689645b895fea089dda8fcaef20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 06:21:53 +0100 Subject: [PATCH 05/23] pythonPackages.python-jsonrpc-server: 0.3.4 -> 0.4.0 --- .../python-jsonrpc-server/default.nix | 28 ++++--------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/pkgs/development/python-modules/python-jsonrpc-server/default.nix b/pkgs/development/python-modules/python-jsonrpc-server/default.nix index 1f33bac6827..9879a441b3e 100644 --- a/pkgs/development/python-modules/python-jsonrpc-server/default.nix +++ b/pkgs/development/python-modules/python-jsonrpc-server/default.nix @@ -1,43 +1,25 @@ -{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder -, pytest, mock, pytestcov, coverage +{ stdenv, lib, buildPythonPackage, fetchFromGitHub, pythonOlder +, pytestCheckHook, mock, pytestcov, coverage , future, futures, ujson, isPy38 -, fetchpatch }: buildPythonPackage rec { pname = "python-jsonrpc-server"; - version = "0.3.4"; + version = "0.4.0"; src = fetchFromGitHub { owner = "palantir"; repo = "python-jsonrpc-server"; rev = version; - sha256 = "027sx5pv4i9a192kr00bjjcxxprh2xyr8q5372q8ghff3xryk9dd"; + sha256 = "0pcf50qvcxqnz3db58whqd8z89cdph19pfs1whgfm0zmwbwk0lw6"; }; postPatch = '' sed -i "s/version=versioneer.get_version(),/version=\"$version\",/g" setup.py - # https://github.com/palantir/python-jsonrpc-server/issues/36 - sed -iEe "s!'ujson.*\$!'ujson',!" setup.py ''; checkInputs = [ - pytest mock pytestcov coverage - ]; - - checkPhase = '' - pytest - ''; - - patches = [ - (fetchpatch { - url = "https://github.com/palantir/python-jsonrpc-server/commit/0a04cc4e9d44233b1038b12d63cd3bd437c2374e.patch"; - sha256 = "177zdnp1808r2pg189bvzab44l8i2alsgv04kmrlhhnv40h66qyg"; - }) - (fetchpatch { - url = "https://github.com/palantir/python-jsonrpc-server/commit/5af6e43d0c1fb9a6a29b96d38cfd6dbeec85d0ea.patch"; - sha256 = "1gx7lc1jxar1ngqqfkdn21s46y1mfnjf7ky2886ydk53nkaba91m"; - }) + pytestCheckHook mock pytestcov coverage ]; propagatedBuildInputs = [ future ujson ] From 63d5e25709f5f31264c21a9f8c7970a7a81b8008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 06:22:33 +0100 Subject: [PATCH 06/23] pythonPackages.python-language-server: 0.34.1 -> 0.36.2 --- .../python-language-server/default.nix | 47 ++++++++----------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/pkgs/development/python-modules/python-language-server/default.nix b/pkgs/development/python-modules/python-language-server/default.nix index 757194d11a5..85e55634806 100644 --- a/pkgs/development/python-modules/python-language-server/default.nix +++ b/pkgs/development/python-modules/python-language-server/default.nix @@ -1,6 +1,10 @@ +<<<<<<< HEAD { lib, stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, pythonOlder, isPy27 +======= +{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27 +>>>>>>> 15db9043242... pythonPackages.python-language-server: 0.34.1 -> 0.36.2 , backports_functools_lru_cache, configparser, futures, future, jedi, pluggy, python-jsonrpc-server, flake8 -, pytestCheckHook, mock, pytestcov, coverage, setuptools, ujson +, pytestCheckHook, mock, pytestcov, coverage, setuptools, ujson, flaky , # Allow building a limited set of providers, e.g. ["pycodestyle"]. providers ? ["*"] # The following packages are optional and @@ -21,33 +25,33 @@ in buildPythonPackage rec { pname = "python-language-server"; - version = "0.34.1"; + version = "0.36.2"; src = fetchFromGitHub { owner = "palantir"; repo = "python-language-server"; rev = version; - sha256 = "sha256-/tVzaoyUO6+7DSvnf3JxpcTY0rU+hHBu5qlru/ZTpxU="; + sha256 = "07x6jr4z20jxn03bxblwc8vk0ywha492cgwfhj7q97nb5cm7kx0q"; }; - patches = [ - # https://github.com/palantir/python-language-server/pull/851 - (fetchpatch { - url = "https://github.com/palantir/python-language-server/commit/f513f3297132492dd41e001d943980e6c4f40809.patch"; - sha256 = "04c9hrb3dzlfchjk4625ipazyfcbq6qq2kj2hg3zf2xsny2jcvi5"; - }) - ]; + propagatedBuildInputs = [ setuptools jedi pluggy future python-jsonrpc-server flake8 ujson ] + ++ stdenv.lib.optional (withProvider "autopep8") autopep8 + ++ stdenv.lib.optional (withProvider "mccabe") mccabe + ++ stdenv.lib.optional (withProvider "pycodestyle") pycodestyle + ++ stdenv.lib.optional (withProvider "pydocstyle") pydocstyle + ++ stdenv.lib.optional (withProvider "pyflakes") pyflakes + ++ stdenv.lib.optional (withProvider "pylint") pylint + ++ stdenv.lib.optional (withProvider "rope") rope + ++ stdenv.lib.optional (withProvider "yapf") yapf + ++ stdenv.lib.optional isPy27 configparser + ++ stdenv.lib.optionals (pythonOlder "3.2") [ backports_functools_lru_cache futures ]; - postPatch = '' - # https://github.com/palantir/python-jsonrpc-server/issues/36 - sed -i -e 's!ujson<=!ujson>=!' setup.py - ''; # The tests require all the providers, disable otherwise. doCheck = providers == ["*"]; checkInputs = [ - pytestCheckHook mock pytestcov coverage + pytestCheckHook mock pytestcov coverage flaky # rope is technically a dependency, but we don't add it by default since we # already have jedi, which is the preferred option rope @@ -67,20 +71,9 @@ buildPythonPackage rec { "test_matplotlib_completions" "test_snippet_parsing" "test_numpy_hover" + "test_symbols" ] ++ stdenv.lib.optional isPy27 "test_flake8_lint"; - propagatedBuildInputs = [ setuptools jedi pluggy future python-jsonrpc-server flake8 ujson ] - ++ stdenv.lib.optional (withProvider "autopep8") autopep8 - ++ stdenv.lib.optional (withProvider "mccabe") mccabe - ++ stdenv.lib.optional (withProvider "pycodestyle") pycodestyle - ++ stdenv.lib.optional (withProvider "pydocstyle") pydocstyle - ++ stdenv.lib.optional (withProvider "pyflakes") pyflakes - ++ stdenv.lib.optional (withProvider "pylint") pylint - ++ stdenv.lib.optional (withProvider "rope") rope - ++ stdenv.lib.optional (withProvider "yapf") yapf - ++ stdenv.lib.optional isPy27 configparser - ++ stdenv.lib.optionals (pythonOlder "3.2") [ backports_functools_lru_cache futures ]; - meta = with lib; { homepage = "https://github.com/palantir/python-language-server"; description = "An implementation of the Language Server Protocol for Python"; From 3428107fcf4955229c975e3d2076e8bce7b984ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 06:23:06 +0100 Subject: [PATCH 07/23] pythonPackage.spyder: Fix dependencies --- pkgs/development/python-modules/spyder/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/spyder/default.nix b/pkgs/development/python-modules/spyder/default.nix index a47a1278425..de1b8123dd9 100644 --- a/pkgs/development/python-modules/spyder/default.nix +++ b/pkgs/development/python-modules/spyder/default.nix @@ -2,7 +2,7 @@ psutil, pyflakes, rope, numpy, scipy, matplotlib, pylint, keyring, numpydoc, qtconsole, qtawesome, nbconvert, mccabe, pyopengl, cloudpickle, pygments, spyder-kernels, qtpy, pyzmq, chardet, qdarkstyle, watchdog, python-language-server -, pyqtwebengine, atomicwrites, pyxdg, diff-match-patch +, pyqtwebengine, atomicwrites, pyxdg, diff-match-patch, three-merge, pyls-black, pyls-spyder }: buildPythonPackage rec { @@ -22,7 +22,7 @@ buildPythonPackage rec { intervaltree jedi pycodestyle psutil pyflakes rope numpy scipy matplotlib pylint keyring numpydoc qtconsole qtawesome nbconvert mccabe pyopengl cloudpickle spyder-kernels pygments qtpy pyzmq chardet pyqtwebengine qdarkstyle watchdog python-language-server - atomicwrites pyxdg diff-match-patch + atomicwrites pyxdg diff-match-patch three-merge pyls-black pyls-spyder ]; # There is no test for spyder @@ -51,7 +51,7 @@ buildPythonPackage rec { postInstall = '' # add Python libs to env so Spyder subprocesses # created to run compute kernels don't fail with ImportErrors - wrapProgram $out/bin/spyder3 --prefix PYTHONPATH : "$PYTHONPATH" + wrapProgram $out/bin/spyder --prefix PYTHONPATH : "$PYTHONPATH" # Create desktop item mkdir -p $out/share/icons From d132cb1424ada5f34d357b2c3640b5cf974ed284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 06:23:36 +0100 Subject: [PATCH 08/23] pythonPackages.pyls-spyder: Init at 0.3.0 --- .../python-modules/pyls-spyder/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/python-modules/pyls-spyder/default.nix diff --git a/pkgs/development/python-modules/pyls-spyder/default.nix b/pkgs/development/python-modules/pyls-spyder/default.nix new file mode 100644 index 00000000000..7e1fa060619 --- /dev/null +++ b/pkgs/development/python-modules/pyls-spyder/default.nix @@ -0,0 +1,24 @@ +{ lib, buildPythonPackage, fetchPypi, python-language-server }: + +buildPythonPackage rec { + pname = "pyls-spyder"; + version = "0.3.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "07apxh12b8ybkx5izr7pg8kbg5g5wgzw7vh5iy2n8dhiqarzp7s1"; + }; + + propagatedBuildInputs = [ python-language-server ]; + + # no tests + doCheck = false; + pythonImportsCheck = [ "pyls_spyder" ]; + + meta = with lib; { + description = "Spyder extensions for the python-language-server"; + homepage = "https://github.com/spyder-ide/pyls-spyder"; + license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2d2d53aedf2..7744624c1e2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5446,6 +5446,8 @@ in { pyls-mypy = callPackage ../development/python-modules/pyls-mypy { }; + pyls-spyder = callPackage ../development/python-modules/pyls-spyder { }; + PyLTI = callPackage ../development/python-modules/pylti { }; pymacaroons = callPackage ../development/python-modules/pymacaroons { }; From 0e780ce87227e8f28cc836bae6e7d591ba6a0bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 06:23:48 +0100 Subject: [PATCH 09/23] nagstamon: Mark as broken --- pkgs/tools/misc/nagstamon/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/nagstamon/default.nix b/pkgs/tools/misc/nagstamon/default.nix index 7f3c3ed4d56..3bd297628b2 100644 --- a/pkgs/tools/misc/nagstamon/default.nix +++ b/pkgs/tools/misc/nagstamon/default.nix @@ -20,6 +20,8 @@ pythonPackages.buildPythonApplication rec { homepage = "https://nagstamon.ifw-dresden.de/"; license = licenses.gpl2; maintainers = with maintainers; [ pSub ]; - inherit version; + # fails to install with: + # TypeError: cannot unpack non-iterable bool object + broken = true; }; } From 981ed50fb2daf19c0e353b4a3c249673a18e20fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 06:24:09 +0100 Subject: [PATCH 10/23] pythonPackages.three-merge: Init at 0.1.1 --- .../python-modules/three-merge/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/python-modules/three-merge/default.nix diff --git a/pkgs/development/python-modules/three-merge/default.nix b/pkgs/development/python-modules/three-merge/default.nix new file mode 100644 index 00000000000..dab312c8845 --- /dev/null +++ b/pkgs/development/python-modules/three-merge/default.nix @@ -0,0 +1,24 @@ +{ lib, buildPythonPackage, fetchPypi, diff-match-patch }: + +buildPythonPackage rec { + pname = "three-merge"; + version = "0.1.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0w6rv7rv1zm901wbjkmm6d3vkwyf3csja9p37bb60mar8khszxk0"; + }; + + propagatedBuildInputs = [ diff-match-patch ]; + + dontUseSetuptoolsCheck = true; + + pythonImportsCheck = [ "three_merge" ]; + + meta = with lib; { + description = "Simple library for merging two strings with respect to a base one"; + homepage = "https://github.com/spyder-ide/three-merge"; + license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7744624c1e2..e71f022d52a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7497,6 +7497,8 @@ in { threadpoolctl = callPackage ../development/python-modules/threadpoolctl { }; + three-merge = callPackage ../development/python-modules/three-merge { }; + thrift = callPackage ../development/python-modules/thrift { }; thumbor = callPackage ../development/python-modules/thumbor { }; From 0a1a3ad2d6ee5f83a0ec012d73f1084c65a558d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 17:08:31 +0100 Subject: [PATCH 11/23] gnomecast: Disable tests --- pkgs/applications/video/gnomecast/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/video/gnomecast/default.nix b/pkgs/applications/video/gnomecast/default.nix index 48615913505..bc045deb9ec 100644 --- a/pkgs/applications/video/gnomecast/default.nix +++ b/pkgs/applications/video/gnomecast/default.nix @@ -20,6 +20,9 @@ buildPythonApplication rec { gappsWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ ffmpeg_3 ]}) ''; + # no tests + doCheck = false; + meta = with lib; { description = "A native Linux GUI for Chromecasting local files"; homepage = "https://github.com/keredson/gnomecast"; From 55444ed07f9512cda681b6a0cc2cc7a6e5241c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 21:59:35 +0100 Subject: [PATCH 12/23] nasc: Fix compilation with gcc10 --- pkgs/applications/science/math/nasc/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/applications/science/math/nasc/default.nix b/pkgs/applications/science/math/nasc/default.nix index 40406cc4588..37173f81978 100644 --- a/pkgs/applications/science/math/nasc/default.nix +++ b/pkgs/applications/science/math/nasc/default.nix @@ -1,6 +1,7 @@ { lib, stdenv , fetchFromGitHub , pkgconfig +, fetchpatch , python3 , meson , ninja @@ -31,6 +32,16 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; + patches = [ + # fix compilation with gcc10 + (fetchpatch { + url = "https://github.com/parnold-x/libqalculate/commit/4fa8f2cceada128ef19f82407226b2c230b780d5.patch"; + extraPrefix = "subprojects/libqalculate/"; + stripLen = "1"; + sha256 = "0kbff623zl0s6yx5avx068f2apwzxzvihjahja4qhlkqkhhzj9dm"; + }) + ]; + nativeBuildInputs = [ glib # post_install.py gtk3 # post_install.py From aa3a78911af9645d5a292c3de568823b72edf39d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 22:11:00 +0100 Subject: [PATCH 13/23] pythonPackages.cliff: Fix dependencies --- .../python-modules/cliff/default.nix | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/cliff/default.nix b/pkgs/development/python-modules/cliff/default.nix index f25170cc6ae..1c551bfb0d9 100644 --- a/pkgs/development/python-modules/cliff/default.nix +++ b/pkgs/development/python-modules/cliff/default.nix @@ -7,12 +7,11 @@ , six , stevedore , pyyaml -, unicodecsv , cmd2 -, pytest -, mock +, pytestCheckHook , testtools , fixtures +, which }: buildPythonPackage rec { @@ -32,20 +31,21 @@ buildPythonPackage rec { stevedore pyyaml cmd2 - unicodecsv ]; - # remove version constraints postPatch = '' - sed -i '/cmd2/c\cmd2' requirements.txt + sed -i -e '/cmd2/c\cmd2' -e '/PrettyTable/c\PrettyTable' requirements.txt ''; - checkInputs = [ fixtures mock pytest testtools ]; + checkInputs = [ fixtures pytestCheckHook testtools which ]; # add some tests - checkPhase = '' - pytest cliff/tests/test_{utils,app,command,help,lister}.py \ - -k 'not interactive_mode' - ''; + pytestFlagsArray = [ + "cliff/tests/test_utils.py" + "cliff/tests/test_app.py" + "cliff/tests/test_command.py" + "cliff/tests/test_help.py" + "cliff/tests/test_lister.py" + ]; meta = with lib; { description = "Command Line Interface Formulation Framework"; From eea84e25e62d35ec0a3577900a0055b9849e53fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 23:14:49 +0100 Subject: [PATCH 14/23] pythonPackages.notmuch2: Disable tests --- pkgs/development/python-modules/notmuch/2.nix | 7 ++++++- .../python-modules/python-language-server/default.nix | 6 +----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/notmuch/2.nix b/pkgs/development/python-modules/notmuch/2.nix index 171b8810870..970928e03f4 100644 --- a/pkgs/development/python-modules/notmuch/2.nix +++ b/pkgs/development/python-modules/notmuch/2.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , buildPythonPackage , notmuch , python @@ -13,6 +14,10 @@ buildPythonPackage { buildInputs = [ python notmuch cffi ]; + # no tests + doCheck = false; + pythonImportsCheck = [ "notmuch2" ]; + meta = with lib; { description = "Pythonic bindings for the notmuch mail database using CFFI"; homepage = "https://notmuchmail.org/"; diff --git a/pkgs/development/python-modules/python-language-server/default.nix b/pkgs/development/python-modules/python-language-server/default.nix index 85e55634806..dc3b33a6f53 100644 --- a/pkgs/development/python-modules/python-language-server/default.nix +++ b/pkgs/development/python-modules/python-language-server/default.nix @@ -1,8 +1,4 @@ -<<<<<<< HEAD -{ lib, stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, pythonOlder, isPy27 -======= -{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27 ->>>>>>> 15db9043242... pythonPackages.python-language-server: 0.34.1 -> 0.36.2 +{ stdenv, lib, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27 , backports_functools_lru_cache, configparser, futures, future, jedi, pluggy, python-jsonrpc-server, flake8 , pytestCheckHook, mock, pytestcov, coverage, setuptools, ujson, flaky , # Allow building a limited set of providers, e.g. ["pycodestyle"]. From 65d9252c348eca7b150430a0f43967f49eef4c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 23:15:00 +0100 Subject: [PATCH 15/23] pythonPackages.notmuch: Disable tests --- pkgs/development/python-modules/notmuch/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/notmuch/default.nix b/pkgs/development/python-modules/notmuch/default.nix index 173f332b314..609d4c78d5d 100644 --- a/pkgs/development/python-modules/notmuch/default.nix +++ b/pkgs/development/python-modules/notmuch/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , buildPythonPackage , notmuch , python @@ -16,6 +17,10 @@ buildPythonPackage { notmuch/globals.py ''; + # no tests + doCheck = false; + pythonImportsCheck = [ "notmuch" ]; + meta = with lib; { description = "A Python wrapper around notmuch"; homepage = "https://notmuchmail.org/"; From 7d08eaaad0c751c47cfbd1768617f25d23404d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 23:20:53 +0100 Subject: [PATCH 16/23] pythonPackages.pyhaversion: Mark >= Python 3.8 only, disable tests --- .../python-modules/pyhaversion/default.nix | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/pyhaversion/default.nix b/pkgs/development/python-modules/pyhaversion/default.nix index 1a32851e6f3..27d750a5df7 100644 --- a/pkgs/development/python-modules/pyhaversion/default.nix +++ b/pkgs/development/python-modules/pyhaversion/default.nix @@ -1,24 +1,16 @@ { lib , buildPythonPackage , fetchPypi -, isPy3k -# propagatedBuildInputs +, pythonOlder , aiohttp , async-timeout , semantic-version -# buildInputs , pytestrunner -# checkInputs -, pytest -, pytest-asyncio -, aresponses }: buildPythonPackage rec { pname = "pyhaversion"; version = "3.4.2"; - - # needs aiohttp which is py3k-only - disabled = !isPy3k; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; @@ -35,15 +27,14 @@ buildPythonPackage rec { pytestrunner ]; - checkInputs = [ - pytest - pytest-asyncio - aresponses - ]; + # no tests + doCheck = false; + pythonImportsCheck = [ "pyhaversion" ]; meta = with lib; { description = "A python module to the newest version number of Home Assistant"; homepage = "https://github.com/ludeeus/pyhaversion"; + license = with licenses; [ mit ]; maintainers = [ maintainers.makefu ]; }; } From e6925c9348b8258cfd21968cf1f6a484c58e9bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 23:29:47 +0100 Subject: [PATCH 17/23] lieer: Disable tests --- pkgs/applications/networking/lieer/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/lieer/default.nix b/pkgs/applications/networking/lieer/default.nix index 83d009e40e8..aee21dca645 100644 --- a/pkgs/applications/networking/lieer/default.nix +++ b/pkgs/applications/networking/lieer/default.nix @@ -19,18 +19,22 @@ python3Packages.buildPythonApplication rec { setuptools ]; + # no tests + doCheck = false; + pythonImportsCheck = [ "lieer" ]; + meta = with lib; { - description = "Fast email-fetching and two-way tag synchronization between notmuch and GMail"; - longDescription = '' + description = "Fast email-fetching and two-way tag synchronization between notmuch and GMail"; + longDescription = '' This program can pull email and labels (and changes to labels) from your GMail account and store them locally in a maildir with the labels synchronized with a notmuch database. The changes to tags in the notmuch database may be pushed back remotely to your GMail account. ''; - homepage = "https://lieer.gaute.vetsj.com/"; + homepage = "https://lieer.gaute.vetsj.com/"; repositories.git = "https://github.com/gauteh/lieer.git"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ flokli kaiha ]; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ flokli kaiha ]; }; } From 0a79e76ab5dbfcbae0eb2945fa72391168f20d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 9 Jan 2021 23:30:26 +0100 Subject: [PATCH 18/23] pythonPackages.worldengine: Cleanups, fix tests --- .../python-modules/worldengine/default.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/worldengine/default.nix b/pkgs/development/python-modules/worldengine/default.nix index fb7326c81d5..51c0de77917 100644 --- a/pkgs/development/python-modules/worldengine/default.nix +++ b/pkgs/development/python-modules/worldengine/default.nix @@ -3,7 +3,6 @@ , pythonOlder , isPy27 , fetchFromGitHub -, nose , noise , numpy , pyplatec @@ -11,6 +10,7 @@ , purepng , h5py , gdal +, pytestCheckHook }: buildPythonPackage rec { @@ -47,13 +47,12 @@ buildPythonPackage rec { --replace 'PyPlatec==1.4.0' 'PyPlatec' \ ''; - # with python<3.5, unittest fails to discover tests because of their filenames - # so nose is used instead. doCheck = !isPy27; # google namespace clash - checkInputs = stdenv.lib.optional (pythonOlder "3.5") [ nose ]; - postCheck = stdenv.lib.optionalString (pythonOlder "3.5") '' - nosetests tests - ''; + checkInputs = [ pytestCheckHook ]; + + disabledTests = [ + "TestSerialization" + ]; meta = with lib; { homepage = "http://world-engine.org"; From fd0ac74050b39c66ade28f06c58e6b0e6493694a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 10 Jan 2021 00:19:07 +0100 Subject: [PATCH 19/23] pythonPackages.xdot: Disable test --- pkgs/development/python-modules/xdot/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/xdot/default.nix b/pkgs/development/python-modules/xdot/default.nix index 75d090699a4..21b45b9c322 100644 --- a/pkgs/development/python-modules/xdot/default.nix +++ b/pkgs/development/python-modules/xdot/default.nix @@ -20,7 +20,8 @@ buildPythonPackage rec { ''; # https://github.com/NixOS/nixpkgs/pull/107872#issuecomment-752175866 - doCheck = stdenv.isLinux; + # cannot import name '_gi' from partially initialized module 'gi' (most likely due to a circular import) + doCheck = false; meta = with lib; { description = "An interactive viewer for graphs written in Graphviz's dot"; From 32c1d619ecec0dedcf9b54eefb9dede38c9255cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 10 Jan 2021 08:06:26 +0100 Subject: [PATCH 20/23] pythonPackages.geopandas: Disable tests on darwin --- pkgs/development/python-modules/geopandas/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/geopandas/default.nix b/pkgs/development/python-modules/geopandas/default.nix index bee22eb98bd..70963a85d41 100644 --- a/pkgs/development/python-modules/geopandas/default.nix +++ b/pkgs/development/python-modules/geopandas/default.nix @@ -29,10 +29,6 @@ buildPythonPackage rec { }) ]; - checkInputs = [ pytestCheckHook Rtree ]; - disabledTests = [ "web" ]; - pytestFlagsArray = [ "geopandas" ]; - propagatedBuildInputs = [ pandas shapely @@ -41,6 +37,11 @@ buildPythonPackage rec { pyproj ]; + doCheck = !stdenv.isDarwin; + checkInputs = [ pytestCheckHook Rtree ]; + disabledTests = [ "web" ]; + pytestFlagsArray = [ "geopandas" ]; + meta = with lib; { description = "Python geospatial data analysis framework"; homepage = "https://geopandas.org"; From cb9b3f11298d18952a990cc0497566d2f0858650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 10 Jan 2021 08:06:55 +0100 Subject: [PATCH 21/23] pythonPackages.guestfs: Disable tests --- pkgs/development/python-modules/guestfs/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/guestfs/default.nix b/pkgs/development/python-modules/guestfs/default.nix index fd12aab81b4..23a2545525a 100644 --- a/pkgs/development/python-modules/guestfs/default.nix +++ b/pkgs/development/python-modules/guestfs/default.nix @@ -11,6 +11,10 @@ buildPythonPackage rec { propagatedBuildInputs = [ libguestfs qemu ]; + # no tests + doCheck = false; + pythonImportsCheck = [ "guestfs" ]; + meta = with lib; { homepage = "https://libguestfs.org/guestfs-python.3.html"; description = "Use libguestfs from Python"; From fdd065c76100311d12e6119cbdfecb4452f82ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 10 Jan 2021 08:08:02 +0100 Subject: [PATCH 22/23] pythonPackages.scrapy: Fix tests on darwin --- pkgs/development/python-modules/scrapy/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scrapy/default.nix b/pkgs/development/python-modules/scrapy/default.nix index 1b7b75eaff4..48bafa41dff 100644 --- a/pkgs/development/python-modules/scrapy/default.nix +++ b/pkgs/development/python-modules/scrapy/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , buildPythonPackage , isPy27 , fetchPypi @@ -79,7 +80,10 @@ buildPythonPackage rec { "test_retry_dns_error" "test_custom_asyncio_loop_enabled_true" "test_custom_loop_asyncio" - ] ++ stdenv.lib.optionals stdenv.isDarwin [ "test_xmliter_encoding" ]; + ] ++ stdenv.lib.optionals stdenv.isDarwin [ + "test_xmliter_encoding" + "test_download" + ]; src = fetchPypi { inherit pname version; @@ -92,6 +96,8 @@ buildPythonPackage rec { install -m 644 -D extras/scrapy_zsh_completion $out/share/zsh/site-functions/_scrapy ''; + __darwinAllowLocalNetworking = true; + meta = with lib; { description = "A fast high-level web crawling and web scraping framework, used to crawl websites and extract structured data from their pages"; homepage = "https://scrapy.org/"; From 112fa6f5b3e974b91a072ee67e0efc0b6cad7e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 10 Jan 2021 08:37:05 +0100 Subject: [PATCH 23/23] pythonPackages.pytil: Fix tests with darwin sandbox --- pkgs/development/python-modules/pytile/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/pytile/default.nix b/pkgs/development/python-modules/pytile/default.nix index d2fd99f6d16..52b3d828ded 100644 --- a/pkgs/development/python-modules/pytile/default.nix +++ b/pkgs/development/python-modules/pytile/default.nix @@ -43,6 +43,8 @@ buildPythonPackage rec { pytestFlagsArray = [ "--ignore examples/" ]; pythonImportsCheck = [ "pytile" ]; + __darwinAllowLocalNetworking = true; + meta = with lib; { description = " Python API for Tile Bluetooth trackers"; longDescription = ''