32 lines
979 B
Diff
32 lines
979 B
Diff
Index: /branches/libffado-2.0/SConstruct
|
|
===================================================================
|
|
--- /branches/libffado-2.0/SConstruct (revision 1473)
|
|
+++ /branches/libffado-2.0/SConstruct (revision 1476)
|
|
@@ -153,23 +153,7 @@
|
|
def CheckForPyModule( context, module ):
|
|
context.Message( "Checking for the python module '" + module + "' " )
|
|
- ret = True
|
|
- path = None
|
|
- while module.count(".") > 0 and ret:
|
|
- thismod = module.split(".")[0]
|
|
- try:
|
|
- modinfo = imp.find_module( thismod, path )
|
|
- except ImportError:
|
|
- ret = False
|
|
- else:
|
|
- newmod = imp.load_module( thismod, modinfo[0], modinfo[1], modinfo[2] )
|
|
- path = newmod.__path__
|
|
- module = ".".join( module.split(".")[1:] )
|
|
- if ret:
|
|
- try:
|
|
- imp.find_module( module )
|
|
- except ImportError:
|
|
- ret = False
|
|
- context.Result( ret )
|
|
- return ret
|
|
+ ret = context.TryAction( "python $SOURCE", "import %s" % module, ".py" )
|
|
+ context.Result( ret[0] )
|
|
+ return ret[0]
|
|
|
|
def CompilerCheck( context ):
|