From 6cc2f2bc4b860e4b9d206ae054f42967678dadce Mon Sep 17 00:00:00 2001 From: Julien Lengrand-Lambert Date: Thu, 2 Aug 2012 18:31:34 +0200 Subject: [PATCH] Adds simple dependency check --- setup.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ccf0409..37a5f54 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,19 @@ ''' Created on 19 avr. 2012 -@author: jll +@author: julien Lengrand-Lambert ''' +import sys +# Check dependencies before installing anything +# Refuse if necessary +try: + import cv # opencv python bindings + from gi.repository import Gtk, GLib # GTK+ dependencies +except ImportError: + print "Some of the dependencies are missing. Please install them and try again" + print "You can learn more about the dependencies in the documentation" + sys.exit(0) + # creating executable here from distutils.core import setup import os @@ -28,7 +39,6 @@ def create_personal(): os.chmod(log_file, 02777) # allow read write access - setup( name = "Ivolution", version = "1.0",