If it's running from the build tree, insert ../ at the head of sys.path. Useful for testing purposes.
This commit is contained in:
parent
7055c1555e
commit
a3b5177e92
|
@ -22,6 +22,14 @@ import sys
|
|||
import os
|
||||
import time
|
||||
import signal
|
||||
|
||||
try:
|
||||
import imp
|
||||
imp.find_module('laditools')
|
||||
except ImportError:
|
||||
# Running from the build tree?
|
||||
sys.path.insert(0, os.path.join(sys.path[0], os.pardir))
|
||||
|
||||
import laditools
|
||||
|
||||
pipe_filename = "/dev/shm/g15log.pipe"
|
||||
|
|
10
bin/ladiconf
10
bin/ladiconf
|
@ -22,10 +22,18 @@
|
|||
import pygtk
|
||||
pygtk.require ('2.0')
|
||||
import gtk
|
||||
import laditools
|
||||
import gobject
|
||||
import sys
|
||||
|
||||
try:
|
||||
import imp
|
||||
imp.find_module('laditools')
|
||||
except ImportError:
|
||||
# Running from the build tree?
|
||||
sys.path.insert(0, os.path.join(sys.path[0], os.pardir))
|
||||
|
||||
import laditools
|
||||
|
||||
jack = laditools.jack_configure()
|
||||
|
||||
def check_ladish():
|
||||
|
|
|
@ -26,6 +26,15 @@ from signal import SIGTERM
|
|||
import termios
|
||||
import tty
|
||||
|
||||
try:
|
||||
import imp
|
||||
imp.find_module('laditools')
|
||||
except ImportError:
|
||||
# Running from the build tree?
|
||||
sys.path.insert(0, os.path.join(sys.path[0], os.pardir))
|
||||
|
||||
import laditools
|
||||
|
||||
try:
|
||||
from gobject import timeout_add
|
||||
import pygtk
|
||||
|
|
|
@ -22,6 +22,14 @@ import pygtk
|
|||
pygtk.require('2.0')
|
||||
import gtk
|
||||
from gobject import timeout_add
|
||||
|
||||
try:
|
||||
import imp
|
||||
imp.find_module('laditools')
|
||||
except ImportError:
|
||||
# Running from the build tree?
|
||||
sys.path.insert(0, os.path.join(sys.path[0], os.pardir))
|
||||
|
||||
import laditools
|
||||
|
||||
# Default configuration
|
||||
|
|
10
bin/wmladi
10
bin/wmladi
|
@ -21,9 +21,17 @@
|
|||
import sys
|
||||
import os
|
||||
from wmdocklib import wmoo, pywmhelpers
|
||||
import laditools
|
||||
import time
|
||||
|
||||
try:
|
||||
import imp
|
||||
imp.find_module('laditools')
|
||||
except ImportError:
|
||||
# Running from the build tree?
|
||||
sys.path.insert(0, os.path.join(sys.path[0], os.pardir))
|
||||
|
||||
import laditools
|
||||
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
import gtk
|
||||
|
|
Loading…
Reference in New Issue