diff --git a/pkgs/applications/networking/instant-messengers/zulip-term/default.nix b/pkgs/applications/networking/instant-messengers/zulip-term/default.nix index 931f95158354..092cb3299990 100644 --- a/pkgs/applications/networking/instant-messengers/zulip-term/default.nix +++ b/pkgs/applications/networking/instant-messengers/zulip-term/default.nix @@ -5,23 +5,47 @@ , libnotify }: -python3.pkgs.buildPythonApplication rec { +let + py = python3.override { + packageOverrides = self: super: { + + # Requires "urwid~=2.1.2", otherwise some tests are failing + urwid = super.urwid.overridePythonAttrs (oldAttrs: rec { + version = "2.1.2"; + src = fetchFromGitHub { + owner = "urwid"; + repo = "urwid"; + rev = "refs/tags/${version}"; + hash = "sha256-oPb2h/+gaqkZTXIiESjExMfBNnOzDvoMkXvkZ/+KVwo="; + }; + doCheck = false; + }); + }; + }; +in +with py.pkgs; + +buildPythonApplication rec { pname = "zulip-term"; version = "0.7.0"; + pyproject = true; - # no tests on PyPI src = fetchFromGitHub { owner = "zulip"; repo = "zulip-terminal"; - rev = version; - sha256 = "sha256-ZouUU4p1FSGMxPuzDo5P971R+rDXpBdJn2MqvkJO+Fw="; + rev = "refs/tags/${version}"; + hash = "sha256-ZouUU4p1FSGMxPuzDo5P971R+rDXpBdJn2MqvkJO+Fw="; }; patches = [ ./pytest-executable-name.patch ]; - propagatedBuildInputs = with python3.pkgs; [ + nativeBuildInputs = with py.pkgs; [ + setuptools + ]; + + propagatedBuildInputs = with py.pkgs; [ beautifulsoup4 lxml pygments @@ -50,6 +74,7 @@ python3.pkgs.buildPythonApplication rec { meta = with lib; { description = "Zulip's official terminal client"; homepage = "https://github.com/zulip/zulip-terminal"; + changelog = "https://github.com/zulip/zulip-terminal/releases/tag/${version}"; license = licenses.asl20; maintainers = with maintainers; [ dotlambda ]; }; diff --git a/pkgs/development/python-modules/blocksat-cli/default.nix b/pkgs/development/python-modules/blocksat-cli/default.nix index ac53b567e5a9..18437efceb4b 100644 --- a/pkgs/development/python-modules/blocksat-cli/default.nix +++ b/pkgs/development/python-modules/blocksat-cli/default.nix @@ -1,53 +1,50 @@ { lib , buildPythonPackage -, fetchPypi , distro +, fetchFromGitHub +, pyasyncore , pysnmp +, pytestCheckHook , python-gnupg +, pythonAtLeast +, pythonOlder , qrcode , requests -, sseclient-py -, zfec -, pytestCheckHook -, pythonOlder +, setuptools }: buildPythonPackage rec { pname = "blocksat-cli"; - version = "0.4.6"; - format = "setuptools"; + version = "2.4.6"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; - src = fetchPypi { - inherit pname version; - hash = "sha256-uANAMNoAC4HUoUuR5ldxoiy+LLzZVpKosU5JttXLnqg="; + src = fetchFromGitHub { + owner = "Blockstream"; + repo = "satellite"; + rev = "refs/tags/v${version}"; + hash = "sha256-1gz2lAS/AHeY54AaVXGeofLC68KjAP7POsIaBL3v2EY="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ distro pysnmp python-gnupg qrcode requests - sseclient-py - zfec + ] ++ lib.optionals (pythonAtLeast "3.12") [ + pyasyncore ]; nativeCheckInputs = [ pytestCheckHook ]; - disabledTestPaths = [ - # disable tests which require being connected to the satellite - "blocksatcli/test_satip.py" - "blocksatcli/api/test_listen.py" - "blocksatcli/api/test_msg.py" - "blocksatcli/api/test_net.py" - # disable tests which require being online - "blocksatcli/api/test_order.py" - ]; - disabledTests = [ "test_monitor_get_stats" "test_monitor_update_with_reporting_enabled" @@ -61,6 +58,7 @@ buildPythonPackage rec { meta = with lib; { description = "Blockstream Satellite CLI"; homepage = "https://github.com/Blockstream/satellite"; + changelog = "https://github.com/Blockstream/satellite/releases/tag/v${version}"; license = licenses.gpl3Only; maintainers = with maintainers; [ prusnak ]; }; diff --git a/pkgs/development/python-modules/lxmf/default.nix b/pkgs/development/python-modules/lxmf/default.nix index 6081f17c2727..a9bdff4e46df 100644 --- a/pkgs/development/python-modules/lxmf/default.nix +++ b/pkgs/development/python-modules/lxmf/default.nix @@ -1,14 +1,15 @@ { lib , buildPythonPackage , fetchFromGitHub -, rns , pythonOlder +, rns +, setuptools }: buildPythonPackage rec { pname = "lxmf"; - version = "0.3.8"; - format = "setuptools"; + version = "0.3.9"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -16,9 +17,13 @@ buildPythonPackage rec { owner = "markqvist"; repo = "lxmf"; rev = "refs/tags/${version}"; - hash = "sha256-tse2Hgu50KfxWLBkzyV4VpDj2YHgxIc5izgvwJAJ/7k="; + hash = "sha256-nZDcSVHR8IKlGBa5ljd3MmgzUPvG7Hv76WRfXxMsndY="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ rns ]; diff --git a/pkgs/development/python-modules/nomadnet/default.nix b/pkgs/development/python-modules/nomadnet/default.nix index 68160474f078..19488765269b 100644 --- a/pkgs/development/python-modules/nomadnet/default.nix +++ b/pkgs/development/python-modules/nomadnet/default.nix @@ -1,17 +1,18 @@ { lib , buildPythonPackage -, rns , fetchFromGitHub , lxmf -, urwid , pythonOlder , qrcode +, rns +, setuptools +, urwid }: buildPythonPackage rec { pname = "nomadnet"; - version = "0.4.4"; - format = "setuptools"; + version = "0.4.5"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -19,9 +20,13 @@ buildPythonPackage rec { owner = "markqvist"; repo = "NomadNet"; rev = "refs/tags/${version}"; - hash = "sha256-k2KJSqOIBU1UwcmNgLek+XVI/C1YwOlAg+l/XJvTx5E="; + hash = "sha256-+w/Earu76mMJFp8ALvaDEkZOGJqlKbO7jfpW/xxvd1o="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ rns lxmf diff --git a/pkgs/development/python-modules/openpyxl/default.nix b/pkgs/development/python-modules/openpyxl/default.nix index 82af53c55119..94252131d9a0 100644 --- a/pkgs/development/python-modules/openpyxl/default.nix +++ b/pkgs/development/python-modules/openpyxl/default.nix @@ -1,22 +1,20 @@ { lib , buildPythonPackage -, fetchFromGitLab -, pythonOlder - -# dependencies , et-xmlfile - -# tests +, fetchFromGitLab , lxml , pandas , pillow , pytestCheckHook +, pythonAtLeast +, pythonOlder +, setuptools }: buildPythonPackage rec { pname = "openpyxl"; version = "3.1.2"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -24,10 +22,14 @@ buildPythonPackage rec { domain = "foss.heptapod.net"; owner = "openpyxl"; repo = "openpyxl"; - rev = version; + rev = "refs/tags/${version}"; hash = "sha256-SWRbjA83AOLrfe6on2CSb64pH5EWXkfyYcTqWJNBEP0="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ et-xmlfile ]; @@ -40,20 +42,29 @@ buildPythonPackage rec { ]; pytestFlagsArray = [ - # broken since lxml 2.12; https://foss.heptapod.net/openpyxl/openpyxl/-/issues/2116 - "--deselect=openpyxl/chart/tests/test_reader.py::test_read" - "--deselect=openpyxl/comments/tests/test_comment_reader.py::test_read_comments" - "--deselect=openpyxl/drawing/tests/test_spreadsheet_drawing.py::TestSpreadsheetDrawing::test_ignore_external_blip" - "--deselect=openpyxl/packaging/tests/test_manifest.py::TestManifest::test_from_xml" - "--deselect=openpyxl/packaging/tests/test_manifest.py::TestManifest::test_filenames" - "--deselect=openpyxl/packaging/tests/test_manifest.py::TestManifest::test_exts" - "--deselect=openpyxl/styles/tests/test_stylesheet.py::TestStylesheet::test_from_complex" - "--deselect=openpyxl/styles/tests/test_stylesheet.py::TestStylesheet::test_merge_named_styles" - "--deselect=openpyxl/styles/tests/test_stylesheet.py::TestStylesheet::test_unprotected_cell" - "--deselect=openpyxl/styles/tests/test_stylesheet.py::TestStylesheet::test_none_values" - "--deselect=openpyxl/styles/tests/test_stylesheet.py::TestStylesheet::test_rgb_colors" - "--deselect=openpyxl/styles/tests/test_stylesheet.py::TestStylesheet::test_named_styles" - "--deselect=openpyxl/workbook/external_link/tests/test_external.py::test_read_ole_link" + "-W" + "ignore::DeprecationWarning" + ]; + disabledTests = [ + # Tests broken since lxml 2.12; https://foss.heptapod.net/openpyxl/openpyxl/-/issues/2116 + "test_read" + "test_read_comments" + "test_ignore_external_blip" + "test_from_xml" + "test_filenames" + "test_exts" + "test_from_complex" + "test_merge_named_styles" + "test_unprotected_cell" + "test_none_values" + "test_rgb_colors" + "test_named_styles" + "test_read_ole_link" + ] ++ lib.optionals (pythonAtLeast "3.11") [ + "test_broken_sheet_ref" + "test_name_invalid_index" + "test_defined_names_print_area" + "test_no_styles" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/pyhanko-certvalidator/default.nix b/pkgs/development/python-modules/pyhanko-certvalidator/default.nix index 8d3037baa454..e55936a8e41c 100644 --- a/pkgs/development/python-modules/pyhanko-certvalidator/default.nix +++ b/pkgs/development/python-modules/pyhanko-certvalidator/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "pyhanko-certvalidator"; - version = "0.26.2"; + version = "0.26.3"; pyproject = true; disabled = pythonOlder "3.7"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "MatthiasValvekens"; repo = "certvalidator"; rev = "refs/tags/v${version}"; - hash = "sha256-yGFaRpAOTbuVfY5UefC1sdJS4FFkgkIZnHHG35p3n3E="; + hash = "sha256-uUmsWiN182g+kxrCny7UNLDHdAdqKk64w6vnjmGBNjM="; }; postPatch = '' @@ -68,8 +68,8 @@ buildPythonPackage rec { "test_revocation_mode_hard_aiohttp_autofetch" # The path could not be validated because no revocation information could be found for intermediate certificate 1 "test_revocation_mode_hard" - # certificate expired 2022-09-17 - "test_revocation_mode_soft" + # ValueError: Hash algorithm not known for ed448 + "test_ed" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/pyutil/default.nix b/pkgs/development/python-modules/pyutil/default.nix index 9b4023bc498d..91f5d0d89f89 100644 --- a/pkgs/development/python-modules/pyutil/default.nix +++ b/pkgs/development/python-modules/pyutil/default.nix @@ -1,33 +1,66 @@ { lib , buildPythonPackage , fetchPypi -, simplejson -, mock -, twisted , isPyPy +, mock +, pytestCheckHook +, pythonAtLeast +, pythonOlder +, setuptools +, simplejson +, twisted +, versioneer }: buildPythonPackage rec { pname = "pyutil"; version = "3.3.6"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; hash = "sha256-XcPWu5xbq6u10Ldz4JQEXXVxLos0ry0psOKGAmaCZ8A="; }; - propagatedBuildInputs = [ simplejson ]; - - nativeCheckInputs = [ mock twisted ]; - prePatch = lib.optionalString isPyPy '' grep -rl 'utf-8-with-signature-unix' ./ | xargs sed -i -e "s|utf-8-with-signature-unix|utf-8|g" ''; - meta = with lib; { - description = "Pyutil, a collection of mature utilities for Python programmers"; + nativeBuildInputs = [ + setuptools + versioneer + ]; + passthru.optional-dependencies = { + jsonutil = [ + simplejson + ]; + # Module not available + # randcookie = [ + # zbase32 + # ]; + }; + + nativeCheckInputs = [ + mock + twisted + pytestCheckHook + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + + pythonImportsCheck = [ + "pyutil" + ]; + + disabledTests = lib.optionals (pythonAtLeast "3.12") [ + # https://github.com/tpltnt/pyutil/issues/10 + "test_decimal" + "test_float" + ]; + + meta = with lib; { + description = "Collection of mature utilities for Python programmers"; longDescription = '' These are a few data structures, classes and functions which we've needed over many years of Python programming and which @@ -37,7 +70,6 @@ buildPythonPackage rec { Python language or its standard library, thus showing that we're not alone in wanting tools like these. ''; - homepage = "https://github.com/tpltnt/pyutil"; license = licenses.gpl2Plus; maintainers = with maintainers; [ prusnak ]; diff --git a/pkgs/development/python-modules/qrcode/default.nix b/pkgs/development/python-modules/qrcode/default.nix index 43379422263d..0b8f69889c33 100644 --- a/pkgs/development/python-modules/qrcode/default.nix +++ b/pkgs/development/python-modules/qrcode/default.nix @@ -1,20 +1,21 @@ { lib , buildPythonPackage , fetchPypi -, setuptools +, mock , pillow , pypng -, typing-extensions -, mock , pytestCheckHook -, testers +, pythonAtLeast , qrcode +, setuptools +, testers +, typing-extensions }: buildPythonPackage rec { pname = "qrcode"; version = "7.4.2"; - format = "pyproject"; + pyproject = true; src = fetchPypi { inherit pname version; @@ -48,11 +49,15 @@ buildPythonPackage rec { }; }; + disabledTests = lib.optionals (pythonAtLeast "3.12") [ + "test_change" + ]; + meta = with lib; { description = "Python QR Code image generator"; homepage = "https://github.com/lincolnloop/python-qrcode"; changelog = "https://github.com/lincolnloop/python-qrcode/blob/v${version}/CHANGES.rst"; license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; - } diff --git a/pkgs/development/python-modules/rns/default.nix b/pkgs/development/python-modules/rns/default.nix index 4b1ccc9bad62..3fc348be7561 100644 --- a/pkgs/development/python-modules/rns/default.nix +++ b/pkgs/development/python-modules/rns/default.nix @@ -5,12 +5,13 @@ , netifaces , pyserial , pythonOlder +, setuptools }: buildPythonPackage rec { pname = "rns"; - version = "0.6.9"; - format = "setuptools"; + version = "0.7.0"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -18,9 +19,13 @@ buildPythonPackage rec { owner = "markqvist"; repo = "Reticulum"; rev = "refs/tags/${version}"; - hash = "sha256-L99eeDGbXXS9bff+r4j5AmmuICfeNKRD8+71+ojw320="; + hash = "sha256-iwW52jPSCwelfByerKHxKgH4NbWwCJLPyHXyBeJPwaM="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ cryptography netifaces diff --git a/pkgs/development/python-modules/thermopro-ble/default.nix b/pkgs/development/python-modules/thermopro-ble/default.nix index b03038c4aa5f..3cf2170ed084 100644 --- a/pkgs/development/python-modules/thermopro-ble/default.nix +++ b/pkgs/development/python-modules/thermopro-ble/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "thermopro-ble"; - version = "0.5.0"; + version = "0.8.0"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "bluetooth-devices"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-4lk/K9XW9naPDRXmuqKFBdOwMtLlQE8etJFEbNgfIvA="; + hash = "sha256-ENzFX0rD97hCnllFKjcSGbAbEksqln/Hj0MuDVOKGDo="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/urwid/default.nix b/pkgs/development/python-modules/urwid/default.nix index 66a8d830cc2d..cf42463c19b2 100644 --- a/pkgs/development/python-modules/urwid/default.nix +++ b/pkgs/development/python-modules/urwid/default.nix @@ -1,26 +1,32 @@ { lib , buildPythonPackage +, exceptiongroup , fetchFromGitHub - -# build-system +, glibcLocales +, pygobject3 +, pyserial +, pytestCheckHook +, pythonOlder +, pyzmq , setuptools , setuptools-scm - -# tests -, glibcLocales -, pytestCheckHook +, tornado +, trio +, twisted }: buildPythonPackage rec { pname = "urwid"; - version = "2.2.3"; - format = "pyproject"; + version = "2.4.3"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "urwid"; repo = "urwid"; rev = "refs/tags/${version}"; - hash = "sha256-oPb2h/+gaqkZTXIiESjExMfBNnOzDvoMkXvkZ/+KVwo="; + hash = "sha256-raDsUZaXBC4s/48KNH8Thrpm8Bq8wj9+Rahk+LkxcDo="; }; postPatch = '' @@ -32,10 +38,35 @@ buildPythonPackage rec { setuptools-scm ]; + passthru.optional-dependencies = { + glib = [ + pygobject3 + ]; + tornado = [ + tornado + ]; + trio = [ + exceptiongroup + trio + ]; + twisted = [ + twisted + ]; + zmq = [ + pyzmq + ]; + serial = [ + pyserial + ]; + lcd = [ + pyserial + ]; + }; + nativeCheckInputs = [ glibcLocales pytestCheckHook - ]; + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); env.LC_ALL = "en_US.UTF8"; @@ -53,8 +84,8 @@ buildPythonPackage rec { ]; meta = with lib; { - changelog = "https://github.com/urwid/urwid/releases/tag/${version}"; description = "A full-featured console (xterm et al.) user interface library"; + changelog = "https://github.com/urwid/urwid/releases/tag/${version}"; downloadPage = "https://github.com/urwid/urwid"; homepage = "https://urwid.org/"; license = licenses.lgpl21Plus; diff --git a/pkgs/development/python-modules/zfec/default.nix b/pkgs/development/python-modules/zfec/default.nix index fc3b710919bc..1e135da34b3a 100644 --- a/pkgs/development/python-modules/zfec/default.nix +++ b/pkgs/development/python-modules/zfec/default.nix @@ -1,8 +1,9 @@ { lib , buildPythonPackage , fetchPypi -, setuptools +, hypothesis , pyutil +, setuptools , twisted }: @@ -20,17 +21,26 @@ buildPythonPackage rec { setuptools ]; - propagatedBuildInputs = [ pyutil ]; + propagatedBuildInputs = [ + pyutil + ]; - nativeCheckInputs = [ twisted ]; + nativeCheckInputs = [ + hypothesis + twisted + ]; - checkPhase = "trial zfec"; + checkPhase = '' + trial zfec + ''; - pythonImportsCheck = [ "zfec" ]; + pythonImportsCheck = [ + "zfec" + ]; meta = with lib; { homepage = "https://github.com/tahoe-lafs/zfec"; - description = "Zfec, a fast erasure codec which can be used with the command-line, C, Python, or Haskell"; + description = "Fast erasure codec which can be used with the command-line, C, Python, or Haskell"; longDescription = '' Fast, portable, programmable erasure coding a.k.a. "forward error correction": the generation of redundant blocks of