Add the root path of the services to python path, not services/.
Get rid of the now useless env.get_services_dir
This commit is contained in:
parent
810bea6772
commit
2d9a06ec9a
@ -18,6 +18,7 @@
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
import sys
|
||||
import os
|
||||
import logging
|
||||
|
||||
from sugar import logger
|
||||
@ -31,9 +32,9 @@ import dbus.glib
|
||||
|
||||
from sugar import env
|
||||
|
||||
sys.path.insert(0, env.get_services_dir())
|
||||
sys.path.insert(0, os.path.join(env.get_data_dir(), 'services/clipboard'))
|
||||
|
||||
from clipboard.clipboardservice import ClipboardService
|
||||
from clipboardservice import ClipboardService
|
||||
|
||||
logging.info('Starting clipboard service.')
|
||||
|
||||
|
@ -3,9 +3,10 @@
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
|
||||
import os, sys
|
||||
import os
|
||||
import sys
|
||||
from sugar import env
|
||||
|
||||
sys.path.insert(0, env.get_services_dir())
|
||||
sys.path.insert(0, os.path.join(env.get_data_dir(), 'services/console'))
|
||||
|
||||
import console.console
|
||||
import console
|
||||
|
@ -18,16 +18,17 @@
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
import sys
|
||||
import os
|
||||
import logging
|
||||
|
||||
from sugar import logger
|
||||
from sugar import env
|
||||
|
||||
sys.path.insert(0, env.get_services_dir())
|
||||
sys.path.insert(0, os.path.join(env.get_data_dir(), 'services/datastore'))
|
||||
|
||||
logger.start('data-store')
|
||||
logging.info('Starting the data store...')
|
||||
|
||||
from datastore import datastore
|
||||
import datastore
|
||||
|
||||
datastore.main()
|
||||
|
@ -24,11 +24,11 @@ import os
|
||||
from sugar import logger
|
||||
from sugar import env
|
||||
|
||||
sys.path.insert(0, env.get_services_dir())
|
||||
sys.path.insert(0, os.path.join(env.get_data_dir(), 'services/presence'))
|
||||
|
||||
logger.start('presenceservice')
|
||||
|
||||
from presence import PresenceService
|
||||
import PresenceService
|
||||
|
||||
logging.info('Starting presence service')
|
||||
|
||||
|
@ -24,11 +24,11 @@ import os
|
||||
from sugar import logger
|
||||
from sugar import env
|
||||
|
||||
sys.path.insert(0, env.get_services_dir())
|
||||
sys.path.insert(0, os.join.path(env.get_data_dir(), 'services/presence2'))
|
||||
|
||||
logger.start('presenceservice')
|
||||
|
||||
from presence2 import presenceservice
|
||||
import presenceservice
|
||||
|
||||
logging.info('Starting presence service')
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
sugar_source_dir = None
|
||||
sugar_data_dir = '@prefix@/share/sugar'
|
||||
sugar_services_dir = '@prefix@/share/sugar/services'
|
||||
sugar_shell_bin_dir = '@prefix@/bin'
|
||||
|
@ -48,9 +48,6 @@ def get_profile_path():
|
||||
def get_data_dir():
|
||||
return sugar_data_dir
|
||||
|
||||
def get_services_dir():
|
||||
return sugar_services_dir
|
||||
|
||||
def get_shell_bin_dir():
|
||||
return sugar_shell_bin_dir
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user