mesonbuild / mesonbuild/meson

Using Anaconda Python and Qt module - Windows. Error with finding QT due to PATH

Open
#2,128 4 comments 0 reactions 0 assignees View on GitHub
dependencies enhancement OS:windows qt
Dominant language
Python
Stars
6.6k
Forks
1.9k
Avg merge
2d 6h
Merged PRs (30d)
33

Description

With the environment setup to have the Qt location on the path (i.e. `C:\Qt\5.8\msvc2015_64\bin`), meson will not find this correctly when running meson with the Anaconda distribution of python.

This is because Anaconda will prepend `C:\Anaconda3\Library\bin` to the `PATH` when it runs.

This means that on line 453 of `dependencies/base.py`:
` command = shutil.which(name)`

Will find the Qt files that exist in that folder when looking for qmake, not the Qt in C:\Qt....

This issue does not occur with the other python I have available, which does not prepend to `PATH`.

Contributor guide

Open the contributing guide

Research direction

Start with dependencies/base.py at line 453 and inspect how shutil.which(name) selects qmake. Reproduce the lookup on Windows with Anaconda Python, C:\Anaconda3\Library\bin first in PATH, and Qt at C:\Qt\5.8\msvc2015_64\bin. Done means Meson finds the intended Qt tools in this setup without regressing normal Python behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.