solved custom import issue?
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.00.0 (2012-07-21 16:12:40) dev
|
Version 2.00.0 (2012-07-23 16:19:51) dev
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ def deploy():
|
|||||||
assert repo.bare == False
|
assert repo.bare == False
|
||||||
|
|
||||||
for i in form.vars.applications:
|
for i in form.vars.applications:
|
||||||
appsrc = os.path.join(os.getcwd(),'applications',i)
|
appsrc = os.path.join(apath(r=request),i)
|
||||||
appdest = os.path.join(osrepo,'wsgi',osname,'applications',i)
|
appdest = os.path.join(osrepo,'wsgi',osname,'applications',i)
|
||||||
dir_util.copy_tree(appsrc,appdest)
|
dir_util.copy_tree(appsrc,appdest)
|
||||||
#shutil.copytree(appsrc,appdest)
|
#shutil.copytree(appsrc,appdest)
|
||||||
|
|||||||
+7
-4
@@ -90,7 +90,7 @@ class Web2pyService(Service):
|
|||||||
cls = _winreg.QueryValue(h, 'PythonClass')
|
cls = _winreg.QueryValue(h, 'PythonClass')
|
||||||
finally:
|
finally:
|
||||||
_winreg.CloseKey(h)
|
_winreg.CloseKey(h)
|
||||||
dir = os.path.dirname(cls)
|
dir = os.path.dirname(cls)
|
||||||
os.chdir(dir)
|
os.chdir(dir)
|
||||||
return True
|
return True
|
||||||
except:
|
except:
|
||||||
@@ -149,8 +149,12 @@ class Web2pyService(Service):
|
|||||||
|
|
||||||
def web2py_windows_service_handler(argv=None, opt_file='options'):
|
def web2py_windows_service_handler(argv=None, opt_file='options'):
|
||||||
path = os.path.dirname(__file__)
|
path = os.path.dirname(__file__)
|
||||||
classstring = os.path.normpath(os.path.join(up(path),
|
web2py_path = iup(path)
|
||||||
'gluon.winservice.Web2pyService'))
|
os.chdir(web2py_path)
|
||||||
|
global_settings.gluon_parent = web2py_path
|
||||||
|
custom_import_install(web2py_path)
|
||||||
|
classstring = os.path.normpath(
|
||||||
|
os.path.join(web2py_path,'gluon.winservice.Web2pyService'))
|
||||||
if opt_file:
|
if opt_file:
|
||||||
Web2pyService._exe_args_ = opt_file
|
Web2pyService._exe_args_ = opt_file
|
||||||
win32serviceutil.HandleCommandLine(Web2pyService,
|
win32serviceutil.HandleCommandLine(Web2pyService,
|
||||||
@@ -158,7 +162,6 @@ def web2py_windows_service_handler(argv=None, opt_file='options'):
|
|||||||
win32serviceutil.HandleCommandLine(Web2pyService,
|
win32serviceutil.HandleCommandLine(Web2pyService,
|
||||||
serviceClassString=classstring, argv=argv)
|
serviceClassString=classstring, argv=argv)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
web2py_windows_service_handler()
|
web2py_windows_service_handler()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user