Commit ed9f33f2 authored by Laurent Bachelier's avatar Laurent Bachelier 🐧 Committed by Romain Bignon
Browse files

setup: Under Python 3, prefer Python 3 Qt

parent c319ce1e
......@@ -30,6 +30,9 @@
from setuptools import find_packages, setup
PY3 = sys.version_info.major >= 3
class BuildQt(Command):
description = 'build Qt applications'
user_options = []
......@@ -43,7 +46,14 @@ def finalize_options(self):
def run(self):
self.announce('Building Qt applications...', WARN)
make = self.find_executable('make', ('gmake', 'make'))
pyuic5 = self.find_executable('pyuic5', ('python2-pyuic5', 'pyuic5-python2.7', 'pyuic5'))
if PY3:
pyuic5 = self.find_executable(
('python2-pyuic5', 'pyuic5-python2.7', 'pyuic5'))
pyuic5 = self.find_executable(
('python3-pyuic5', 'pyuic5-python3.7', 'pyuic5-python3.6', 'pyuic5-python3.5', 'pyuic5'))
if not pyuic5 or not make:
print('Install missing component(s) (see above) or disable Qt applications (with --no-qt).',
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment