From 8d0d701fe3fd980bd8a540db32ea017fd41cdf3c Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 11 Jan 2025 17:47:55 +0900 Subject: [PATCH 1/2] python312Packages.meinheld: fix build with GCC --- pkgs/development/python-modules/meinheld/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/meinheld/default.nix b/pkgs/development/python-modules/meinheld/default.nix index f29125287d7a..376a59b9a493 100644 --- a/pkgs/development/python-modules/meinheld/default.nix +++ b/pkgs/development/python-modules/meinheld/default.nix @@ -1,5 +1,7 @@ { lib, + stdenv, + pythonAtLeast, fetchPypi, buildPythonPackage, greenlet, @@ -10,6 +12,8 @@ buildPythonPackage rec { version = "1.0.2"; format = "setuptools"; + disabled = pythonAtLeast "3.13"; + src = fetchPypi { inherit pname version; sha256 = "008c76937ac2117cc69e032dc69cea9f85fc605de9bac1417f447c41c16a56d6"; @@ -21,6 +25,8 @@ buildPythonPackage rec { substituteInPlace setup.py --replace "greenlet>=0.4.5,<0.5" "greenlet>=0.4.5" ''; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=implicit-function-declaration"; + propagatedBuildInputs = [ greenlet ]; # No tests From c47e7f291fd7017d881975a22ca5baace6ca868f Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 11 Jan 2025 17:52:25 +0900 Subject: [PATCH 2/2] python312Packages.meinheld: refactor --- .../python-modules/meinheld/default.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/meinheld/default.nix b/pkgs/development/python-modules/meinheld/default.nix index 376a59b9a493..fa0b6fccec7b 100644 --- a/pkgs/development/python-modules/meinheld/default.nix +++ b/pkgs/development/python-modules/meinheld/default.nix @@ -4,39 +4,38 @@ pythonAtLeast, fetchPypi, buildPythonPackage, + setuptools, greenlet, }: buildPythonPackage rec { pname = "meinheld"; version = "1.0.2"; - format = "setuptools"; + pyproject = true; disabled = pythonAtLeast "3.13"; src = fetchPypi { inherit pname version; - sha256 = "008c76937ac2117cc69e032dc69cea9f85fc605de9bac1417f447c41c16a56d6"; + hash = "sha256-AIx2k3rCEXzGngMtxpzqn4X8YF3pusFBf0R8QcFqVtY="; }; - patchPhase = '' - # Allow greenlet-1.0.0. - # See https://github.com/mopemope/meinheld/pull/123 - substituteInPlace setup.py --replace "greenlet>=0.4.5,<0.5" "greenlet>=0.4.5" - ''; + pythonRelaxDeps = [ "greenlet" ]; env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=implicit-function-declaration"; - propagatedBuildInputs = [ greenlet ]; + build-system = [ setuptools ]; + + dependencies = [ greenlet ]; # No tests doCheck = false; pythonImportsCheck = [ "meinheld" ]; - meta = with lib; { + meta = { description = "High performance asynchronous Python WSGI Web Server"; homepage = "https://meinheld.org/"; - license = licenses.bsd3; + license = lib.licenses.bsd3; }; }