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/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" diff --git a/pkgs/development/python-modules/versioningit/default.nix b/pkgs/development/python-modules/versioningit/default.nix index c578f96e1883..9abbf8bba33b 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, @@ -18,23 +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="; }; - postPatch = '' - substituteInPlace tox.ini \ - --replace "--cov=versioningit" "" \ - --replace "--cov-config=tox.ini" "" \ - --replace "--no-cov-on-fail" "" - ''; - nativeBuildInputs = [ hatchling ]; propagatedBuildInputs = @@ -47,6 +41,7 @@ buildPythonPackage rec { build hatchling pydantic + pytest-cov-stub pytest-mock setuptools git 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" 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 cf49725db571..da729b009352 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 { };