From 1ef616a56cd1d3f8843528756ce45e4c2c19fd56 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 30 Oct 2022 21:09:56 +0100 Subject: [PATCH 01/11] python310Packages.bleach: add optional-dependencies --- .../python-modules/bleach/default.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/bleach/default.nix b/pkgs/development/python-modules/bleach/default.nix index 06cefc9bbb0d..de3caef7b0d2 100644 --- a/pkgs/development/python-modules/bleach/default.nix +++ b/pkgs/development/python-modules/bleach/default.nix @@ -5,14 +5,16 @@ , six , html5lib , setuptools +, tinycss2 , packaging , pythonOlder +, webencodings }: buildPythonPackage rec { pname = "bleach"; version = "5.0.1"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; @@ -20,12 +22,19 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - packaging - six html5lib + packaging setuptools + six + webencodings ]; + passthru.optional-dependencies = { + css = [ + tinycss2 + ]; + }; + checkInputs = [ pytestCheckHook ]; @@ -35,7 +44,9 @@ buildPythonPackage rec { "protocols" ]; - pythonImportsCheck = [ "bleach" ]; + pythonImportsCheck = [ + "bleach" + ]; meta = with lib; { description = "An easy, HTML5, whitelisting HTML sanitizer"; From 27f48e897b856da779fdcdeba163d319c9e597cb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 30 Oct 2022 21:11:41 +0100 Subject: [PATCH 02/11] python310Packages.mezzanine: add missing extra dependency --- pkgs/development/python-modules/mezzanine/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mezzanine/default.nix b/pkgs/development/python-modules/mezzanine/default.nix index d4087e12c88d..2c5346e5763c 100644 --- a/pkgs/development/python-modules/mezzanine/default.nix +++ b/pkgs/development/python-modules/mezzanine/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { version = "6.0.0"; format = "setuptools"; - disabled = pythonOlder "3.6" || isPyPy; + disabled = pythonOlder "3.7" || isPyPy; src = fetchPypi { pname = "Mezzanine"; @@ -50,10 +50,11 @@ buildPythonPackage rec { requests requests-oauthlib tzlocal - ]; + ] ++ bleach.optional-dependencies.css; # Tests Fail Due to Syntax Warning, Fixed for v3.1.11+ doCheck = false; + # sed calls will be unecessary in v3.1.11+ preConfigure = '' sed -i 's/==/>=/' setup.py From 86905139ba6775102509822917610210e4107a89 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 1 Nov 2022 10:02:35 +0100 Subject: [PATCH 03/11] python310Packages.aesara: 2.8.1 -> 2.8.4 --- pkgs/development/python-modules/aesara/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aesara/default.nix b/pkgs/development/python-modules/aesara/default.nix index d4f3c1160517..968652d9adf6 100644 --- a/pkgs/development/python-modules/aesara/default.nix +++ b/pkgs/development/python-modules/aesara/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { owner = "aesara-devs"; repo = "aesara"; rev = "refs/tags/rel-${version}"; - hash = "sha256-Mt1IweQkPqxv+ynezdFHTJXU/oTOwhPkY49GzFJpPaM="; + hash = "sha256-xtnz+qKW2l8ze0EXdL9mkx0MzfAnmauC9042W2cVc5o="; }; nativeBuildInputs = [ @@ -74,14 +74,15 @@ buildPythonPackage rec { "tests/scan/" "tests/tensor/" "tests/sandbox/" + "tests/sparse/sandbox/" ]; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); description = "Python library to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays"; homepage = "https://github.com/aesara-devs/aesara"; changelog = "https://github.com/aesara-devs/aesara/releases"; license = licenses.bsd3; maintainers = with maintainers; [ Etjean ]; + broken = (stdenv.isLinux && stdenv.isAarch64); }; } From 79af3041e6e42209dcff1ea79879dfc5f6f0fc0b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 1 Nov 2022 10:56:46 +0100 Subject: [PATCH 04/11] python310Packages.aeppl: 0.0.35 -> 0.0.38 --- pkgs/development/python-modules/aeppl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aeppl/default.nix b/pkgs/development/python-modules/aeppl/default.nix index 2edf88c4cf4a..bbd13871f676 100644 --- a/pkgs/development/python-modules/aeppl/default.nix +++ b/pkgs/development/python-modules/aeppl/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "aeppl"; - version = "0.0.35"; + version = "0.0.38"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "aesara-devs"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-HUcLa/9fTUBJYszo1SiG08t7DQiNSd8EsINkJpAeLsY="; + hash = "sha256-B9ZZEzGW4i0RRUaTAYiQ7+7pe4ArpSGcp/x4B6G7EYo="; }; propagatedBuildInputs = [ From 1dfb8fb7a9c7e14cb2de923c0a79a7acafe8598e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 1 Nov 2022 11:21:41 +0100 Subject: [PATCH 05/11] python310Packages.python-lsp-server: switch to optional-dependencies --- .../python-lsp-server/default.nix | 96 ++++++++++++------- 1 file changed, 60 insertions(+), 36 deletions(-) diff --git a/pkgs/development/python-modules/python-lsp-server/default.nix b/pkgs/development/python-modules/python-lsp-server/default.nix index eafad1a9ab09..c72543343d19 100644 --- a/pkgs/development/python-modules/python-lsp-server/default.nix +++ b/pkgs/development/python-modules/python-lsp-server/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , autopep8 , buildPythonPackage , fetchFromGitHub @@ -21,19 +22,10 @@ , rope , setuptools , setuptools-scm -, stdenv , ujson +, websockets , whatthepatch , yapf -, withAutopep8 ? true -, withFlake8 ? true -, withMccabe ? true -, withPycodestyle ? true -, withPydocstyle ? true -, withPyflakes ? true -, withPylint ? true -, withRope ? true -, withYapf ? true }: buildPythonPackage rec { @@ -68,15 +60,53 @@ buildPythonPackage rec { setuptools setuptools-scm ujson - ] ++ lib.optional withAutopep8 autopep8 - ++ lib.optional withFlake8 flake8 - ++ lib.optional withMccabe mccabe - ++ lib.optional withPycodestyle pycodestyle - ++ lib.optional withPydocstyle pydocstyle - ++ lib.optional withPyflakes pyflakes - ++ lib.optional withPylint pylint - ++ lib.optional withRope rope - ++ lib.optionals withYapf [ whatthepatch yapf ]; + ]; + + passthru.optional-dependencies = { + all = [ + autopep8 + flake8 + mccabe + pycodestyle + pydocstyle + pyflakes + pylint + rope + whatthepatch + yapf + ]; + autopep8 = [ + autopep8 + ]; + flake8 = [ + flake8 + ]; + mccabe = [ + mccabe + ]; + pycodestyle = [ + pycodestyle + ]; + pydocstyle = [ + pydocstyle + ]; + pyflakes = [ + pyflakes + ]; + pylint = [ + pylint + ]; + rope = [ + rope + ]; + yapf = [ + whatthepatch + yapf + ]; + websockets = [ + websockets + ]; + }; checkInputs = [ flaky @@ -84,26 +114,20 @@ buildPythonPackage rec { numpy pandas pytestCheckHook - ] + ] ++ passthru.optional-dependencies.all # pyqt5 is broken on aarch64-darwin - ++ lib.optionals (!stdenv.isDarwin || !stdenv.isAarch64) [ pyqt5 ]; + ++ lib.optionals (!stdenv.isDarwin || !stdenv.isAarch64) [ + pyqt5 + ]; disabledTests = [ - "test_numpy_completions" # https://github.com/python-lsp/python-lsp-server/issues/243 - ] ++ lib.optional (!withPycodestyle) "test_workspace_loads_pycodestyle_config" - # pyqt5 is broken on aarch64-darwin - ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "test_pyqt_completion"; - - disabledTestPaths = lib.optional (!withAutopep8) "test/plugins/test_autopep8_format.py" - ++ lib.optional (!withRope) "test/plugins/test_completion.py" - ++ lib.optional (!withFlake8) "test/plugins/test_flake8_lint.py" - ++ lib.optional (!withMccabe) "test/plugins/test_mccabe_lint.py" - ++ lib.optional (!withPycodestyle) "test/plugins/test_pycodestyle_lint.py" - ++ lib.optional (!withPydocstyle) "test/plugins/test_pydocstyle_lint.py" - ++ lib.optional (!withPyflakes) "test/plugins/test_pyflakes_lint.py" - ++ lib.optional (!withPylint) "test/plugins/test_pylint_lint.py" - ++ lib.optional (!withRope) "test/plugins/test_rope_rename.py" - ++ lib.optional (!withYapf) "test/plugins/test_yapf_format.py"; + # https://github.com/python-lsp/python-lsp-server/issues/243 + "test_numpy_completions" + "test_workspace_loads_pycodestyle_config" + ] ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) [ + # pyqt5 is broken on aarch64-darwin + "test_pyqt_completion" + ]; preCheck = '' export HOME=$(mktemp -d); From 79af9f0ac2053878281cf1a10011af3e9ac71752 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 1 Nov 2022 11:32:27 +0100 Subject: [PATCH 06/11] python310Packages.python-lsp-server: adjust postPatch --- .../python-modules/python-lsp-server/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/python-lsp-server/default.nix b/pkgs/development/python-modules/python-lsp-server/default.nix index c72543343d19..72bfed33cdb3 100644 --- a/pkgs/development/python-modules/python-lsp-server/default.nix +++ b/pkgs/development/python-modules/python-lsp-server/default.nix @@ -46,7 +46,11 @@ buildPythonPackage rec { substituteInPlace pyproject.toml \ --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \ --replace "--cov pylsp --cov test" "" \ - --replace "mccabe>=0.6.0,<0.7.0" "mccabe" + --replace "autopep8>=1.6.0,<1.7.0" "autopep8" \ + --replace "flake8>=4.0.0,<4.1.0" "flake8" \ + --replace "mccabe>=0.6.0,<0.7.0" "mccabe" \ + --replace "pycodestyle>=2.8.0,<2.9.0" "pycodestyle" \ + --replace "pyflakes>=2.4.0,<2.5.0" "pyflakes" ''; preBuild = '' From d34a0432ac246076ac85d76c94442cad2a1eb26b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 1 Nov 2022 11:45:56 +0100 Subject: [PATCH 07/11] python310Packages.pylsp-mypy: add missing input - run more tests - update edisable --- .../python-modules/pylsp-mypy/default.nix | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/pylsp-mypy/default.nix b/pkgs/development/python-modules/pylsp-mypy/default.nix index 718a64b28f0b..a2504e4bbc9d 100644 --- a/pkgs/development/python-modules/pylsp-mypy/default.nix +++ b/pkgs/development/python-modules/pylsp-mypy/default.nix @@ -1,39 +1,49 @@ { lib , buildPythonPackage , fetchFromGitHub -, mock , mypy , pytestCheckHook , python-lsp-server , pythonOlder +, toml }: buildPythonPackage rec { pname = "pylsp-mypy"; version = "0.6.3"; - disabled = pythonOlder "3.6"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "Richardk2n"; repo = "pylsp-mypy"; rev = "refs/tags/${version}"; - sha256 = "sha256-fZ2bPPjBK/H2jMI4S3EhvWJaNl4tK7HstxcHSAkoFW4="; + hash = "sha256-fZ2bPPjBK/H2jMI4S3EhvWJaNl4tK7HstxcHSAkoFW4="; }; + propagatedBuildInputs = [ + mypy + python-lsp-server + toml + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pylsp_mypy" + ]; + disabledTests = [ - "test_multiple_workspaces" + # Tests wants to call dmypy "test_option_overrides_dmypy" ]; - checkInputs = [ pytestCheckHook mock ]; - - propagatedBuildInputs = [ mypy python-lsp-server ]; - - pythonImportsCheck = [ "pylsp_mypy" ]; - meta = with lib; { - homepage = "https://github.com/Richardk2n/pylsp-mypy"; description = "Mypy plugin for the Python LSP Server"; + homepage = "https://github.com/Richardk2n/pylsp-mypy"; license = licenses.mit; maintainers = with maintainers; [ cpcloud ]; }; From 86e9b3ef8a536da6861c60c34209fb7768504b15 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 1 Nov 2022 13:33:01 +0100 Subject: [PATCH 08/11] python310Packages.spyder: update inputs --- .../python-modules/spyder/default.nix | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/spyder/default.nix b/pkgs/development/python-modules/spyder/default.nix index 85fe9ed37e72..a5e11ebc6f00 100644 --- a/pkgs/development/python-modules/spyder/default.nix +++ b/pkgs/development/python-modules/spyder/default.nix @@ -41,21 +41,23 @@ , textdistance , three-merge , watchdog -, pytestCheckHook }: buildPythonPackage rec { pname = "spyder"; version = "5.3.3"; + format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-vWhwn07zgHX7/7uAz0ekNwnAiKLECCBzBq47TtTaHfE="; + hash = "sha256-vWhwn07zgHX7/7uAz0ekNwnAiKLECCBzBq47TtTaHfE="; }; - nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ]; + nativeBuildInputs = [ + pyqtwebengine.wrapQtAppsHook + ]; propagatedBuildInputs = [ atomicwrites @@ -63,19 +65,16 @@ buildPythonPackage rec { cloudpickle cookiecutter diff-match-patch - flake8 intervaltree jedi jellyfish keyring matplotlib - mccabe nbconvert numpy numpydoc psutil pygments - pylint pyls-spyder pyopengl pyqtwebengine @@ -83,7 +82,6 @@ buildPythonPackage rec { python-lsp-server pyxdg pyzmq - pycodestyle qdarkstyle qstylizer qtawesome @@ -96,7 +94,7 @@ buildPythonPackage rec { textdistance three-merge watchdog - ]; + ] ++ python-lsp-server.optional-dependencies.all; # There is no test for spyder doCheck = false; @@ -112,15 +110,16 @@ buildPythonPackage rec { }; postPatch = '' - # remove dependency on pyqtwebengine - # this is still part of the pyqt 5.11 version we have in nixpkgs + # Remove dependency on pyqtwebengine + # This is still part of the pyqt 5.11 version we have in nixpkgs sed -i /pyqtwebengine/d setup.py substituteInPlace setup.py \ + --replace "qdarkstyle>=3.0.2,<3.1.0" "qdarkstyle" \ --replace "ipython>=7.31.1,<8.0.0" "ipython" ''; postInstall = '' - # add Python libs to env so Spyder subprocesses + # Add Python libs to env so Spyder subprocesses # created to run compute kernels don't fail with ImportErrors wrapProgram $out/bin/spyder --prefix PYTHONPATH : "$PYTHONPATH" @@ -147,7 +146,7 @@ buildPythonPackage rec { downloadPage = "https://github.com/spyder-ide/spyder/releases"; changelog = "https://github.com/spyder-ide/spyder/blob/master/CHANGELOG.md"; license = licenses.mit; - platforms = platforms.linux; maintainers = with maintainers; [ gebner ]; + platforms = platforms.linux; }; } From 4689b87f78bf70281c63c382d3bc3606b8147306 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 1 Nov 2022 16:11:36 +0100 Subject: [PATCH 09/11] python310Packages.arviz: 0.12.1 -> 0.13.0 --- pkgs/development/python-modules/arviz/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/arviz/default.nix b/pkgs/development/python-modules/arviz/default.nix index 8cd1ae1b83da..eb5cbc90efa9 100644 --- a/pkgs/development/python-modules/arviz/default.nix +++ b/pkgs/development/python-modules/arviz/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { pname = "arviz"; - version = "0.12.1"; + version = "0.13.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -40,7 +40,7 @@ buildPythonPackage rec { owner = "arviz-devs"; repo = pname; rev = "v${version}"; - hash = "sha256-5P6EXXAAS1Q2eNQuj/5JrDg0lPHfA5K4WaYfKaaXm9s="; + hash = "sha256-DGTGUMnkEQcwGR44WhmBpTBMcRcAtVIpM4YVnnlakE8="; }; propagatedBuildInputs = [ @@ -90,6 +90,10 @@ buildPythonPackage rec { "test_plot_separation" "test_plot_trace_legend" "test_cov" + # countourpy is not available at the moment + "test_plot_kde" + "test_plot_kde_2d" + "test_plot_pair" ]; pythonImportsCheck = [ From 4f2d34ad52874b36add23f57fafc1a0198d23cce Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 1 Nov 2022 16:12:25 +0100 Subject: [PATCH 10/11] python310Packages.pymc: 4.1.3 -> 4.3.0 --- pkgs/development/python-modules/pymc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pymc/default.nix b/pkgs/development/python-modules/pymc/default.nix index ba9b82b35297..4434312e2683 100644 --- a/pkgs/development/python-modules/pymc/default.nix +++ b/pkgs/development/python-modules/pymc/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "pymc"; - version = "4.1.3"; + version = "4.3.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "pymc-devs"; repo = "pymc"; rev = "refs/tags/v${version}"; - hash = "sha256-fqhtfMGopzVgonF5+qyFhm72KV0hX8QE95slI/HBZYU="; + hash = "sha256-pkeAcsdVBDc7eKC03+FDJCYT48PaVcXT8K8U8T4gGKo="; }; nativeBuildInputs = [ From da20b0814d09008d585fa17d9e1f5627d9cfb1fe Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 1 Nov 2022 16:48:42 +0100 Subject: [PATCH 11/11] python310Packages.cma: limit tests --- pkgs/development/python-modules/cma/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/cma/default.nix b/pkgs/development/python-modules/cma/default.nix index a6e3d442675f..5f1121c8e914 100644 --- a/pkgs/development/python-modules/cma/default.nix +++ b/pkgs/development/python-modules/cma/default.nix @@ -3,17 +3,21 @@ , fetchFromGitHub , numpy , python +, pythonOlder }: buildPythonPackage rec { pname = "cma"; version = "3.2.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "CMA-ES"; repo = "pycma"; rev = "refs/tags/r${version}"; - sha256 = "sha256-STF7jtLqI2KiWvvI9/reRjP1XyW8l4/qy9uAPpE9mTs="; + hash = "sha256-STF7jtLqI2KiWvvI9/reRjP1XyW8l4/qy9uAPpE9mTs="; }; propagatedBuildInputs = [ @@ -21,13 +25,18 @@ buildPythonPackage rec { ]; checkPhase = '' - ${python.executable} -m cma.test + # At least one doctest fails, thus only limited amount of files is tested + ${python.executable} -m cma.test interfaces.py purecma.py logger.py optimization_tools.py transformations.py ''; + pythonImportsCheck = [ + "cma" + ]; + meta = with lib; { - description = "CMA-ES, Covariance Matrix Adaptation Evolution Strategy for non-linear numerical optimization in Python"; + description = "Library for Covariance Matrix Adaptation Evolution Strategy for non-linear numerical optimization"; homepage = "https://github.com/CMA-ES/pycma"; license = licenses.bsd3; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; }