Get rid of the global python path extensions

This commit is contained in:
Marco Pesenti Gritti 2006-10-17 10:14:42 +02:00
parent 77f2de8f73
commit 0836c57f76
4 changed files with 1 additions and 18 deletions

View File

@ -19,9 +19,7 @@
import os import os
import sys import sys
curdir = os.path.abspath(os.path.dirname(__file__)) sourcedir = os.path.abspath(os.path.dirname(__file__))
sourcedir = os.path.dirname(curdir)
if os.path.isfile(os.path.join(sourcedir, 'sugar/__uninstalled__.py')): if os.path.isfile(os.path.join(sourcedir, 'sugar/__uninstalled__.py')):
print 'Running sugar from ' + sourcedir + ' ...' print 'Running sugar from ' + sourcedir + ' ...'
sys.path.insert(0, sourcedir) sys.path.insert(0, sourcedir)

View File

@ -5,6 +5,4 @@ sugar_activity_info_dir = '@prefix@/share/sugar/activities'
sugar_services_dir = '@prefix@/share/sugar/services' sugar_services_dir = '@prefix@/share/sugar/services'
sugar_dbus_config = '@prefix@/share/sugar/dbus-installed.conf' sugar_dbus_config = '@prefix@/share/sugar/dbus-installed.conf'
sugar_python_path = ['@prefix@/share/sugar/activities']
sugar_bin_path = [] sugar_bin_path = []

View File

@ -10,9 +10,6 @@ sugar_activity_info_dir = __tmpdir
sugar_dbus_config = os.path.join(sugar_source_dir, 'dbus-uninstalled.conf') sugar_dbus_config = os.path.join(sugar_source_dir, 'dbus-uninstalled.conf')
sugar_python_path = []
sugar_python_path.append(os.path.join(sugar_source_dir, 'activities'))
sugar_bin_path = [] sugar_bin_path = []
sugar_bin_path.append(os.path.join(sugar_source_dir)) sugar_bin_path.append(os.path.join(sugar_source_dir))
sugar_bin_path.append(os.path.join(sugar_source_dir, 'shell')) sugar_bin_path.append(os.path.join(sugar_source_dir, 'shell'))

View File

@ -26,17 +26,7 @@ except ImportError:
import sugar.setup import sugar.setup
def setup_python_path():
for path in sugar_python_path:
if os.environ.has_key('PYTHONPATH'):
old_path = os.environ['PYTHONPATH']
os.environ['PYTHONPATH'] = path + ':' + old_path
else:
os.environ['PYTHONPATH'] = path
def setup_system(): def setup_system():
setup_python_path()
for path in sugar_bin_path: for path in sugar_bin_path:
if os.environ.has_key('PATH'): if os.environ.has_key('PATH'):
old_path = os.environ['PATH'] old_path = os.environ['PATH']