I compiled wxPython on SUSE enterprise linux a few weeks ago, and yesterday I tried using html2 widget and it failed with NotImplementedError, so I am wondering how to compile with webview. Searching the corporate linux env (I don’t have sudo access) I see some .so files with webview in their name (looks like some older versions of wx, qt, etc).
Is there a flag or step I am missing in this workflow:
# make new virtualenv, and activate it
mkdir wxpython_build
cd wxpython_build
pip install sip==6.8.5
git clone https://github.com/wxWidgets/Phoenix.git
cd Phoenix
git checkout wxPython-4.2.2
git submodule update --init --recursive
setenv CFLAGS "-I/usr/corpname/pkgs/python3/3.11.1/include/python3.11"
setenv LDFLAGS "-lpthread -ldl -lutil -lm"
python build.py --gtk2 dox etg --nodoc sip build
python build.py install
cd ../..
rm -rf wxpython_build
# install my wxpython package and run it
well after recompiling with all that… I still face NotImplementedError… so is there some way to enforce wanting webview to compile, so I will get an error rather than silent “failure” (to include it during build)
The issue you’re facing is that you need the bundled wxWidgets to be compiled with WebView support. So you may want to investigate wxWidgets’ config.log to see why it can’t find WebKit libraries.