[pitivi: 33/41] Turn numpy into a "soft dependency"; disable autoalign if it's absent.



commit 83e7a727ff8964101905ae709ec4a71b026e2071
Author: Benjamin M. Schwartz <bens alum mit edu>
Date:   Mon Jul 25 16:24:34 2011 -0400

    Turn numpy into a "soft dependency"; disable autoalign if it's absent.
    
    Running without numpy will cause the auto-align functions to appear
    permanently grayed-out in the UI.
    
    Conflicts:
    
    	pitivi/timeline/align.py

 pitivi/timeline/alignalgs.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/alignalgs.py b/pitivi/timeline/alignalgs.py
index 918ce7c..8835e8f 100644
--- a/pitivi/timeline/alignalgs.py
+++ b/pitivi/timeline/alignalgs.py
@@ -23,7 +23,10 @@
 Algorithms for aligning (i.e. registering, synchronizing) time series
 """
 
-import numpy
+try:
+    import numpy
+except ImportError:
+    numpy = None
 
 
 def nextpow2(x):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]