This fixes #225 by additionally searching for the lrelease binary in the location Qt installs its binaries to, since this location may not necessarily be in the environment's PATH variable. This allows the build script to more closely match how other build systems make use of tools like lrelease, and in particular mirrors how Qt's appropriate CMake module finds this program.
This change searches the Qt binary location first, and if it cannot find a file named lrelease there, or if for whatever reason an attempt to query the binary directory returns nothing, then setup.py will try finding a suitable binary exactly as it did before. I don't know if the old searching code is still necessary in this instance, so I kept it to be safe. This code only looks for lrelease in the Qt-provided location, and not lrelease-qt5 like the path-based search does, since I assume the -qt5 suffix wouldn't be used for binaries installed to the Qt5-specific directory.
This fixes #225 by additionally searching for the
lrelease
binary in the location Qt installs its binaries to, since this location may not necessarily be in the environment'sPATH
variable. This allows the build script to more closely match how other build systems make use of tools likelrelease
, and in particular mirrors how Qt's appropriate CMake module finds this program.This change searches the Qt binary location first, and if it cannot find a file named
lrelease
there, or if for whatever reason an attempt to query the binary directory returns nothing, then setup.py will try finding a suitable binary exactly as it did before. I don't know if the old searching code is still necessary in this instance, so I kept it to be safe. This code only looks forlrelease
in the Qt-provided location, and notlrelease-qt5
like the path-based search does, since I assume the-qt5
suffix wouldn't be used for binaries installed to the Qt5-specific directory.