set correct paths

This commit is contained in:
Marcos Pinto 2007-08-02 07:12:33 +00:00
parent 5bfc868aad
commit a383f42957
2 changed files with 12 additions and 2 deletions

View File

@ -197,6 +197,16 @@ class write_data_install_path(cmd.Command):
conf_filename = os.path.join(self.lib_build_dir, conf_filename = os.path.join(self.lib_build_dir,
'deluge', 'common.py') 'deluge', 'common.py')
conf_file = open(conf_filename, 'r')
data = conf_file.read()
conf_file.close()
data = data.replace('@datadir@', self.prefix)
conf_file = open(conf_filename, 'w')
conf_file.write(data)
conf_file.close()
conf_filename = os.path.join(self.lib_build_dir,
'deluge', 'interface.py')
conf_file = open(conf_filename, 'r') conf_file = open(conf_filename, 'r')
data = conf_file.read() data = conf_file.read()
conf_file.close() conf_file.close()

View File

@ -48,7 +48,7 @@ import ipc_manager
import plugins import plugins
import tab_details import tab_details
import tab_files import tab_files
INSTALL_PREFIX = '@datadir@'
class DelugeGTK: class DelugeGTK:
def __init__(self): def __init__(self):
self.ipc_manager = ipc_manager.Manager(self) self.ipc_manager = ipc_manager.Manager(self)
@ -123,7 +123,7 @@ class DelugeGTK:
def new_release_check(): def new_release_check():
import os, sys import os, sys
py_version = sys.version[:3] py_version = sys.version[:3]
file = '/usr/lib/python' + py_version + '/site-packages/deluge/update.py' file = INSTALL_PREFIX + '/lib/python' + py_version + '/site-packages/deluge/update.py'
os.spawnlp(os.P_NOWAIT, 'python', 'python', file, common.PROGRAM_VERSION) os.spawnlp(os.P_NOWAIT, 'python', 'python', file, common.PROGRAM_VERSION)
if self.config.get("new_releases"): if self.config.get("new_releases"):