mirror of https://github.com/tp4a/teleport
fix for work on Windows.
parent
6454bf0300
commit
f71d9fa1b1
|
@ -0,0 +1,20 @@
|
|||
# pip install -U pip
|
||||
# pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
|
||||
# ... or ...
|
||||
# pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
# pip install -r requirements.txt
|
||||
|
||||
tornado
|
||||
PyMySQL
|
||||
psutil
|
||||
Mako
|
||||
Pillow
|
||||
wheezy.captcha
|
||||
qrcode
|
||||
ldap3
|
||||
cffi
|
||||
|
||||
# for Windows
|
||||
pycryptodome
|
||||
# for Linux
|
||||
pycrypto
|
|
@ -7,7 +7,7 @@
|
|||
<content url="file://$MODULE_DIR$/webroot">
|
||||
<sourceFolder url="file://$MODULE_DIR$/webroot" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="py37" jdkType="Python SDK" />
|
||||
<orderEntry type="jdk" jdkName="py39" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="TemplatesService">
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
import platform
|
||||
import signal
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'webroot'))
|
||||
|
@ -29,7 +30,8 @@ def main():
|
|||
return 1
|
||||
|
||||
signal.signal(signal.SIGINT, signal_handler) # Ctrl-C
|
||||
signal.signal(signal.SIGHUP, signal_handler) # 发送给具有Terminal的Controlling Process,当terminal 被disconnect时候发送
|
||||
if platform.system().lower() != 'windows':
|
||||
signal.signal(signal.SIGHUP, signal_handler) # 发送给具有Terminal的Controlling Process,当terminal 被disconnect时候发送
|
||||
signal.signal(signal.SIGTERM, signal_handler) # kill
|
||||
|
||||
ret = g_web_app.run()
|
||||
|
|
|
@ -25,7 +25,8 @@ if PLATFORM not in ['windows', 'linux', 'darwin']:
|
|||
PATH_DATA = ''
|
||||
|
||||
# 将Python安装的扩展库移除,避免开发调试与正式发布所依赖的库文件不一致导致发布的版本无法运行
|
||||
if PLATFORM != 'darwin':
|
||||
# if PLATFORM != 'darwin':
|
||||
if PLATFORM not in ['windows', 'darwin']:
|
||||
x = []
|
||||
for p in sys.path:
|
||||
if p.find('site-packages') != -1 or p.find('dist-packages') != -1:
|
||||
|
|
Loading…
Reference in New Issue