From 649aa5999b819d2f1a5928f829ea7852065e4f3e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 9 Aug 2024 17:07:46 +0200 Subject: [PATCH 1/5] python312Packages.versioningit: migrate to pytest-cov-stub --- pkgs/development/python-modules/versioningit/default.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/versioningit/default.nix b/pkgs/development/python-modules/versioningit/default.nix index c578f96e1883..68729dc107ba 100644 --- a/pkgs/development/python-modules/versioningit/default.nix +++ b/pkgs/development/python-modules/versioningit/default.nix @@ -10,6 +10,7 @@ build, hatchling, pydantic, + pytest-cov-stub, pytest-mock, setuptools, git, @@ -28,12 +29,6 @@ buildPythonPackage rec { hash = "sha256-sLpYblrwi4fb4zVAgpEKHQUCw2IC1JbhrmDvO0HuKcE="; }; - postPatch = '' - substituteInPlace tox.ini \ - --replace "--cov=versioningit" "" \ - --replace "--cov-config=tox.ini" "" \ - --replace "--no-cov-on-fail" "" - ''; nativeBuildInputs = [ hatchling ]; @@ -47,6 +42,7 @@ buildPythonPackage rec { build hatchling pydantic + pytest-cov-stub pytest-mock setuptools git From 3d856e4c3b978e7dbc0ed7c7035a4aa6df665c71 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 9 Aug 2024 17:40:52 +0200 Subject: [PATCH 2/5] python312Packages.versioningit: 3.1.1 -> 3.1.2 https://versioningit.readthedocs.io/en/latest/changelog.html#v3-1-2-2024-07-20 --- pkgs/development/python-modules/versioningit/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/versioningit/default.nix b/pkgs/development/python-modules/versioningit/default.nix index 68729dc107ba..9abbf8bba33b 100644 --- a/pkgs/development/python-modules/versioningit/default.nix +++ b/pkgs/development/python-modules/versioningit/default.nix @@ -19,17 +19,16 @@ buildPythonPackage rec { pname = "versioningit"; - version = "3.1.1"; + version = "3.1.2"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-sLpYblrwi4fb4zVAgpEKHQUCw2IC1JbhrmDvO0HuKcE="; + hash = "sha256-Tbg+2Z9WsH2DlAvuNEXKRsoSDRO2swTNtftE5apO3sA="; }; - nativeBuildInputs = [ hatchling ]; propagatedBuildInputs = From 750047954598fb7f4a89c922be2d4451a64a238a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 9 Aug 2024 17:41:34 +0200 Subject: [PATCH 3/5] python312Packages.isal: 1.7.0 -> 1.7.0 https://github.com/pycompression/python-isal/blob/v1.7.0/CHANGELOG.rst --- .../python-modules/isal/default.nix | 18 +++++++++++++++--- .../python-modules/isal/version.patch | 16 ++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/python-modules/isal/version.patch diff --git a/pkgs/development/python-modules/isal/default.nix b/pkgs/development/python-modules/isal/default.nix index 795eacab36b0..3a7ca9a07a2b 100644 --- a/pkgs/development/python-modules/isal/default.nix +++ b/pkgs/development/python-modules/isal/default.nix @@ -2,9 +2,11 @@ lib, buildPythonPackage, fetchFromGitHub, + substituteAll, # build-system setuptools, + versioningit, # native dependencies isa-l, @@ -16,17 +18,27 @@ buildPythonPackage rec { pname = "isal"; - version = "1.6.1"; + version = "1.7.0"; pyproject = true; src = fetchFromGitHub { owner = "pycompression"; repo = "python-isal"; rev = "v${version}"; - hash = "sha256-EhdKT2ftyU2zevFg9Yi3q2FVx0FmKwJMzszsK1NS3Qg="; + hash = "sha256-wasybbNWBa6Zd0JI2/lBNUkvEOY3/iBqsVWh/4WPM2s="; }; - build-system = [ setuptools ]; + patches = [ + (substituteAll { + src = ./version.patch; + inherit version; + }) + ]; + + build-system = [ + setuptools + versioningit + ]; buildInputs = [ isa-l ]; diff --git a/pkgs/development/python-modules/isal/version.patch b/pkgs/development/python-modules/isal/version.patch new file mode 100644 index 000000000000..9a8500a12d46 --- /dev/null +++ b/pkgs/development/python-modules/isal/version.patch @@ -0,0 +1,16 @@ +diff --git a/pyproject.toml b/pyproject.toml +index bf5fe99..b559255 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -2,9 +2,8 @@ + requires = ["setuptools>=64", "versioningit>=1.1.0"] + build-backend = "setuptools.build_meta" + +-[tool.versioningit.vcs] +-method="git" +-default-tag = "v0.0.0" ++[tool.versioningit] ++default-version = "@version@" + + [tool.versioningit.write] + file = "src/isal/_version.py" From 73af18ee3dfec4f4927dc8f8c33199c73b21a8b7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 9 Aug 2024 17:45:20 +0200 Subject: [PATCH 4/5] python312Packages.zlib-ng: 0.5.0 -> 0.5.0 https://github.com/pycompression/python-zlib-ng/blob/v0.5.0/CHANGELOG.rst --- .../python-modules/zlib-ng/default.nix | 16 +++++++++++++--- .../python-modules/zlib-ng/version.patch | 16 ++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/python-modules/zlib-ng/version.patch diff --git a/pkgs/development/python-modules/zlib-ng/default.nix b/pkgs/development/python-modules/zlib-ng/default.nix index d8c926c4729b..697a8405ecbd 100644 --- a/pkgs/development/python-modules/zlib-ng/default.nix +++ b/pkgs/development/python-modules/zlib-ng/default.nix @@ -2,10 +2,12 @@ lib, buildPythonPackage, fetchFromGitHub, + substituteAll, # build-system cmake, setuptools, + versioningit, # native dependencies zlib-ng, @@ -16,19 +18,27 @@ buildPythonPackage rec { pname = "zlib-ng"; - version = "0.4.3"; + version = "0.5.0"; pyproject = true; src = fetchFromGitHub { owner = "pycompression"; repo = "python-zlib-ng"; rev = "v${version}"; - hash = "sha256-M0R39vUX3JMDEDJfsRzg1ipxbWJ/kl0FzW6ZUMXvGDs="; + hash = "sha256-H8Niz6BbmNCccNKHBfRma4SUt0RY846fCiHidEvcd5E="; }; - nativeBuildInputs = [ + patches = [ + (substituteAll { + src = ./version.patch; + inherit version; + }) + ]; + + build-system = [ cmake setuptools + versioningit ]; dontUseCmakeConfigure = true; diff --git a/pkgs/development/python-modules/zlib-ng/version.patch b/pkgs/development/python-modules/zlib-ng/version.patch new file mode 100644 index 000000000000..e1f335525646 --- /dev/null +++ b/pkgs/development/python-modules/zlib-ng/version.patch @@ -0,0 +1,16 @@ +diff --git a/pyproject.toml b/pyproject.toml +index 28ae41d..05ad409 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -2,9 +2,8 @@ + requires = ["setuptools>=64", "versioningit>=1.1.0"] + build-backend = "setuptools.build_meta" + +-[tool.versioningit.vcs] +-method="git" +-default-tag = "v0.0.0" ++[tool.versioningit] ++default-version = "@version@" + + [tool.versioningit.write] + file = "src/zlib_ng/_version.py" From f61999af9c8f176bbf963ebcb0d53aa55c911c96 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 11 Aug 2024 18:04:54 +0200 Subject: [PATCH 5/5] python312Packages.aiohttp-isal: drop "This library is obsolete and replaced by https://github.com/bdraco/aiohttp-fast-zlib" --- .../python-modules/aiohttp-isal/default.nix | 51 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 - 3 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 pkgs/development/python-modules/aiohttp-isal/default.nix diff --git a/pkgs/development/python-modules/aiohttp-isal/default.nix b/pkgs/development/python-modules/aiohttp-isal/default.nix deleted file mode 100644 index a518d2431c77..000000000000 --- a/pkgs/development/python-modules/aiohttp-isal/default.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - - # build-system - poetry-core, - - # dependencies - aiohttp, - isal, - - # tests - pytestCheckHook, -}: - -buildPythonPackage rec { - pname = "aiohttp-isal"; - version = "0.3.2"; - pyproject = true; - - src = fetchFromGitHub { - owner = "bdraco"; - repo = "aiohttp-isal"; - rev = "refs/tags/v${version}"; - hash = "sha256-sAtAzqMJoKryhB8q/TxqgFE+Z4Uxxw0hghk/Y2VNvx0="; - }; - - build-system = [ poetry-core ]; - - dependencies = [ - aiohttp - isal - ]; - - nativeCheckInputs = [ pytestCheckHook ]; - - preCheck = '' - sed -i '/addopts/d' pyproject.toml - ''; - - pythonImportsCheck = [ "aiohttp_isal" ]; - - meta = with lib; { - changelog = "https://github.com/bdraco/aiohttp-isal/blob/${src.rev}/CHANGELOG.md"; - description = "Isal support for aiohttp"; - homepage = "https://github.com/bdraco/aiohttp-isal"; - license = licenses.asl20; - maintainers = with maintainers; [ hexa ]; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index b6ad1e3e8f43..0be2f1a7c543 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -38,6 +38,7 @@ mapAliases ({ acebinf = throw "acebinf has been removed because it is abandoned and broken."; # Added 2023-05-19 adafruit-nrfutil = throw "adafruit-nrfutil has been promoted to a top-level attribute name: `pkgs.adafruit-nrfutil`."; # Added 2023-11-19 aioaladdinconnect = throw "aioaladdinconnect has been removed, as the API is supported was obsoleted on 2024-01-24."; # Added 2024-06-07 + aiohttp-isal = throw "aiohttp-isal has been removed, as it has been archived and replace by aiohttp-fast-zlib"; # Added 2024-08-11 aiomysensors = throw "aiomysensors has been removed, as it was packaged for Home Assistant, which migrated to pymysensors."; # Added 2024-07-07 aioh2 = throw "aioh2 has been removed because it is abandoned and broken."; # Added 2022-03-30 aionotify = throw "aionotify has been removed because is unmaintained and incompatible with python3.11."; # Added 2023-10-27 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c24f453d6f9a..02a1dad7e43a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -247,8 +247,6 @@ self: super: with self; { aiohttp-fast-zlib = callPackage ../development/python-modules/aiohttp-fast-zlib { }; - aiohttp-isal = callPackage ../development/python-modules/aiohttp-isal { }; - aiohttp-jinja2 = callPackage ../development/python-modules/aiohttp-jinja2 { }; aiohttp-middlewares = callPackage ../development/python-modules/aiohttp-middlewares { };