Merge pull request #326142 from wegank/wxpython-fix

python312Packages.wxpython: fix build
This commit is contained in:
Martin Weinelt
2024-08-20 17:15:39 +02:00
committed by GitHub
@@ -3,7 +3,6 @@
stdenv,
buildPythonPackage,
setuptools,
pythonAtLeast,
fetchPypi,
substituteAll,
@@ -15,6 +14,7 @@
python,
sip,
which,
buildPackages,
# runtime
cairo,
@@ -44,7 +44,6 @@ buildPythonPackage rec {
pname = "wxpython";
version = "4.2.1";
format = "other";
disabled = pythonAtLeast "3.12";
src = fetchPypi {
pname = "wxPython";
@@ -61,6 +60,13 @@ buildPythonPackage rec {
})
];
# https://github.com/wxWidgets/Phoenix/issues/2575
postPatch = ''
ln -s ${lib.getExe buildPackages.waf} bin/waf
substituteInPlace build.py \
--replace-fail "distutils.dep_util" "setuptools.modified"
'';
nativeBuildInputs = [
attrdict
pkg-config
@@ -103,6 +109,7 @@ buildPythonPackage rec {
export DOXYGEN=${doxygen}/bin/doxygen
export PATH="${wxGTK}/bin:$PATH"
export SDL_CONFIG="${SDL.dev}/bin/sdl-config"
export WAF=$PWD/bin/waf
${python.pythonOnBuildForHost.interpreter} build.py -v --use_syswx dox etg sip --nodoc build_py