From b6f512349557668db3a561f4655942fb4ddfed04 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Sun, 9 Jul 2017 13:17:51 +0300 Subject: [PATCH] setup.py fix for packages --- setup.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 4623952..adcd58c 100644 --- a/setup.py +++ b/setup.py @@ -8,10 +8,23 @@ import sys version = program_version + '.0' -MODULES = ['PyQt5', 'PyAudio', 'numpy'] if system() == 'Windows': - MODULES.append('opencv-python') + MODULES = ['PyQt5', 'PyAudio', 'numpy', 'opencv-python'] +else: + MODULES = [] + try: + import pyaudio + except ImportError: + MODULES.append('PyAudio') + try: + import PyQt5 + except ImportError: + MODULES.append('PyQt5') + try: + import numpy + except ImportError: + MODULES.append('numpy') class InstallScript(install):