Compile wxPython from source on openSUSE Tumbleweed
Dev Tools
sudo zypper -n install -t pattern devel_basis
sudo zypper -n install gcc-c++ git wget
Requirement for build Python from source (Build dependencies)
sudo zypper -n install \
readline-devel sqlite3-devel libbz2-devel \
zlib-devel libopenssl-devel libffi-devel \
ncurses-devel tk-devel ca-certificates gcc
Install wxPython 4 Dependencies
sudo zypper -n install \
gtk3-devel gtk3-tools webkit2gtk3-devel \
libjbig2 libjbig-devel libjpeg8 libjpeg8-devel \
libpng16-16 libpng16-devel libtiff-devel \
libSDL2-2_0-0 libSDL2-devel libSM6 libSM-devel\
gstreamer gstreamer-devel gstreamer-plugins-base-devel \
freeglut-devel libnotify4 libnotify-devel \
libSM6 libSM-devel liblzma5 libXtst6 libXv1 \
gdk-pixbuf-loader-rsvg gdk-pixbuf-query-loaders
Install Pyenv
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> $HOME/.bashrc
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> $HOME/.bashrc
echo 'eval "$(pyenv init -)"' >> $HOME/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> $HOME/.bashrc
source $HOME/.bashrc
--enable-shared
Custom Python build with PYTHON_CONFIGURE_OPTS="--enable-shared" \
pyenv install 3.8.12
pyenv shell 3.8.12
python-config
to the PATH
Add PATH=$(pyenv root)/versions/${PYENV_VERSION}/bin:$PATH
Build wxPython from source
git clone https://github.com/wxWidgets/Phoenix
cd Phoenix
git submodule update --init --recursive
pip install -r requirements.txt
python build.py clean
python build.py dox etg --nodoc sip build_wx -v
Create simbolic link to build/wxbld/gtk3/lib64
ln -s lib build/wxbld/gtk3/lib64
Continue with build for Python
python build.py build_py -v
Create wheel
python setup.py bdist_wheel
Test wxPython
pip install dist/wxPython-4.1.2a1-cp38-cp38-linux_x86_64.whl
python -c "import wx; print(wx.version());"
Good Luck!