Skip to content

Commit 7545924

Browse files
authored
python312Packages.meinheld: fix build with GCC (#373119)
2 parents 09858bf + c47e7f2 commit 7545924

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed
Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,41 @@
11
{
22
lib,
3+
stdenv,
4+
pythonAtLeast,
35
fetchPypi,
46
buildPythonPackage,
7+
setuptools,
58
greenlet,
69
}:
710

811
buildPythonPackage rec {
912
pname = "meinheld";
1013
version = "1.0.2";
11-
format = "setuptools";
14+
pyproject = true;
15+
16+
disabled = pythonAtLeast "3.13";
1217

1318
src = fetchPypi {
1419
inherit pname version;
15-
sha256 = "008c76937ac2117cc69e032dc69cea9f85fc605de9bac1417f447c41c16a56d6";
20+
hash = "sha256-AIx2k3rCEXzGngMtxpzqn4X8YF3pusFBf0R8QcFqVtY=";
1621
};
1722

18-
patchPhase = ''
19-
# Allow greenlet-1.0.0.
20-
# See https://github.com/mopemope/meinheld/pull/123
21-
substituteInPlace setup.py --replace "greenlet>=0.4.5,<0.5" "greenlet>=0.4.5"
22-
'';
23+
pythonRelaxDeps = [ "greenlet" ];
24+
25+
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=implicit-function-declaration";
26+
27+
build-system = [ setuptools ];
2328

24-
propagatedBuildInputs = [ greenlet ];
29+
dependencies = [ greenlet ];
2530

2631
# No tests
2732
doCheck = false;
2833

2934
pythonImportsCheck = [ "meinheld" ];
3035

31-
meta = with lib; {
36+
meta = {
3237
description = "High performance asynchronous Python WSGI Web Server";
3338
homepage = "https://meinheld.org/";
34-
license = licenses.bsd3;
39+
license = lib.licenses.bsd3;
3540
};
3641
}

0 commit comments

Comments
 (0)