PyQt-builder does not build Designer plugin in conda environment

Phil Thompson phil at
Wed Sep 7 17:24:16 BST 2022

On 10/08/2022 10:26, Ivan Sinkarenko wrote:
> Hello Phil,
> Trying to build PyQt5 from source, I ran into issue, where Qt Designer
> plugin would not be built.
> PyQt-builder checks for sysconfig.get_config_vars() information in
> However, conda's Python is build statically linking to libpython, and
> they provide in addition to that in every environment.
> Some pointers could be found here:
> Python 3.7 used to have --enable-shared configuration flag, but in
> Python 3.9 this is no longer the case.

--enable-shared is present in all Python versions as far as I can tell.

> It seems that it might be affecting the PyQt conda-forge package for
> that reason:
> To verify:
>> docker run -it continuumio/miniconda3 python -c 'import sysconfig; 
>> print(sysconfig.get_config_vars("CONFIG_ARGS"))'
>> ... output will not have "--enable-shared" ...
>> docker run -it continuumio/miniconda3 python -c 'import sysconfig; 
>> print(sysconfig.get_config_vars("LDLIBRARY"))'
>> ['libpython3.9.a']
>> docker run -it continuumio/miniconda3 bash -c 'find /opt/conda -name 
>> "*libpython*"'
>> /opt/conda/lib/
>> /opt/conda/lib/
>> /opt/conda/lib/
> PyQt-builder already looks for with glob, but only after
> sysconfig assumptions are met.
> Bypassing those assumptions solves the problem.

This can be configured using pyproject.toml, see...

> As a side note, in PyQt-builder's code, sysconfig gets imported via
> distutils, while it can be imported directly from the stdlib.
> Recent versions of setuptools can get upset when somebody imports
> distutils before them, so it could be useful
> to minimize that.

Fixed, thanks.


More information about the PyQt mailing list