Inquiry regarding Python binding versions in Windows MSVC binaries and custom compilation guidance

Hi GStreamer Community,

I have noticed some inconsistency regarding the Python versions targeted by the Windows MSVC binaries. Specifically, in the 1.26.x release, the binaries included _gi.cp313-win_amd64.pyd (targeting Python 3.13), but the recent 1.28 release appears to include _gi.cp39-win_amd64.pyd (targeting Python 3.9).

This inconsistency makes it difficult to maintain stable deployment environments. I have two questions for the maintainers and the community:

  1. Versioning Strategy: Is there a specific reason the Python target version fluctuates between releases? Is there a plan to standardize on a specific Python “Long Term Support” version or provide multiple .pyd files for common Python versions (e.g., 3.10, 3.12, 3.13) in the official installer?

  2. Custom Compilation: Since the pre-built binaries often don’t match our local environment, what is the current recommended workflow for compiling only the Python bindings (gst-python and gobject-introspection) on Windows to match a specific Python version?

I would appreciate any guidance on the Meson flags or environment setup required to build these bindings against a local Python installation while linking them to the official GStreamer MSVC library binaries.

Best regards

pip install gstreamer-bundle 

:+1:

As of 1.28.x, the recommended way to pull in the Python bindings for your app is using the wheels, which you have already discovered. We support Python 3.9, 3.10, 3.11, 3.12, 3.12t, 3.13, 3.13t, 3.14, 3.14t on Windows MSVC.

PyGObject doesn’t use the Limited C API, so separate pyd files are needed for each Python version. Long-term the plan is to switch to that, to avoid needing separate pyd files. We can ship pyd files for all supported Python versions in the installers, it’s a bug that we don’t do that at present. Will be fixed for 1.28.2.

For custom compilation, cerbero will build pyd files for whatever Python version you use to run it.