kunapi 1.17__tar.gz → 1.19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {kunapi-1.17 → kunapi-1.19}/PKG-INFO +2 -2
  2. {kunapi-1.17 → kunapi-1.19}/kunapi/__init__.py +1 -1
  3. {kunapi-1.17 → kunapi-1.19}/kunapi/kunapi.py +39 -32
  4. {kunapi-1.17 → kunapi-1.19}/kunapi.egg-info/PKG-INFO +2 -2
  5. {kunapi-1.17 → kunapi-1.19}/kunapi/Events.py +0 -0
  6. {kunapi-1.17 → kunapi-1.19}/kunapi/app.py +0 -0
  7. {kunapi-1.17 → kunapi-1.19}/kunapi/common/__init__.py +0 -0
  8. {kunapi-1.17 → kunapi-1.19}/kunapi/common/autoload.py +0 -0
  9. {kunapi-1.17 → kunapi-1.19}/kunapi/common/globals.py +0 -0
  10. {kunapi-1.17 → kunapi-1.19}/kunapi/common/request.py +0 -0
  11. {kunapi-1.17 → kunapi-1.19}/kunapi/config/__init__.py +0 -0
  12. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/__init__.py +0 -0
  13. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/common/__init__.py +0 -0
  14. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/common/autoload.py +0 -0
  15. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/common/model.py +0 -0
  16. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/config/__init__.py +0 -0
  17. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/config/app.py +0 -0
  18. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/index/__init__.py +0 -0
  19. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/index/common/__init__.py +0 -0
  20. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/index/common/autoload.py +0 -0
  21. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/index/controller/__init__.py +0 -0
  22. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/index/controller/index/__init__.py +0 -0
  23. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/index/controller/index/common/__init__.py +0 -0
  24. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/index/controller/index/common/autoload.py +0 -0
  25. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/index/controller/index/common/model.py +0 -0
  26. {kunapi-1.17 → kunapi-1.19}/kunapi/tempfile/kunapi/app/index/controller/index/index.py +0 -0
  27. {kunapi-1.17 → kunapi-1.19}/kunapi.egg-info/SOURCES.txt +0 -0
  28. {kunapi-1.17 → kunapi-1.19}/kunapi.egg-info/dependency_links.txt +0 -0
  29. {kunapi-1.17 → kunapi-1.19}/kunapi.egg-info/entry_points.txt +0 -0
  30. {kunapi-1.17 → kunapi-1.19}/kunapi.egg-info/requires.txt +0 -0
  31. {kunapi-1.17 → kunapi-1.19}/kunapi.egg-info/top_level.txt +0 -0
  32. {kunapi-1.17 → kunapi-1.19}/setup.cfg +0 -0
  33. {kunapi-1.17 → kunapi-1.19}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kunapi
3
- Version: 1.17
3
+ Version: 1.19
4
4
  Summary: kunapi
5
5
  Home-page: https://docs.kwebapp.cn/index/index/2
6
6
  Author: 百里-坤坤
@@ -8,7 +8,7 @@ Author-email: fengkun01@qq.com
8
8
  Maintainer: 坤坤
9
9
  Maintainer-email: fengkun01@qq.com
10
10
  License: MIT License
11
- Keywords: kunapi1.17
11
+ Keywords: kunapi1.19
12
12
  Requires-Dist: gunicorn==20.0.4
13
13
  Requires-Dist: waitress==3.0.0
14
14
  Requires-Dist: watchdog==4.0.0
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = '1.17'
2
+ __version__ = '1.19'
3
3
  try:
4
4
  from .app import web
5
5
  except:pass
@@ -129,6 +129,8 @@ def get_cmd_par(fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr=''):
129
129
  print("\033[1;31;40m有关"+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+"命令的详细信息,请键入 "+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+" help",e)
130
130
  return False
131
131
  else:
132
+ if not path:
133
+ path=os.getcwd()
132
134
  cmd_par={
133
135
  'server':server,
134
136
  'update':update,
@@ -138,46 +140,45 @@ def get_cmd_par(fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr=''):
138
140
  }
139
141
  if cmd_par['cmd']:
140
142
  if '&&' in cmd_par['cmd']:
141
- for cmds in cmd_par['cmd'].split('&&'):
142
- print('执行命令',cmds.strip())
143
- if cmds[0:3] == 'cd ':
144
- # os.system(cmds)
145
- print('已切换工作目录',cmds[3:])
146
- os.chdir(cmds[3:].strip())
147
- else:
148
- if os.name == 'posix':
149
- if cmd_par['daemonyun']:
150
- with daemon.DaemonContext():
151
- os.system(cmds.strip())
143
+ if os.name == 'posix' and cmd_par['daemonyun']:
144
+ with daemon.DaemonContext():
145
+ os.chdir(cmd_par['path'])
146
+ for cmds in cmd_par['cmd'].split('&&'):
147
+ print('执行命令',cmds.strip())
148
+ if cmds[0:3] == 'cd ':
149
+ print('已切换工作目录',cmds[3:])
150
+ os.chdir(cmds[3:].strip())
152
151
  else:
153
152
  os.system(cmds.strip())
154
- else:
155
- os.system(cmds.strip())
156
- elif '||' in cmd_par['cmd']:
157
- for cmds in cmd_par['cmd'].split('||'):
158
- print('执行命令',cmds)
159
- if cmds[0:3] == 'cd ':
160
- print('已切换工作目录',cmds[3:])
161
- os.chdir(cmds[3:])
153
+ else:
154
+ if os.name == 'posix' and cmd_par['daemonyun']:
155
+ with daemon.DaemonContext():
156
+ os.chdir(cmd_par['path'])
157
+ for cmds in cmd_par['cmd'].split('&&'):
158
+ print('执行命令',cmds.strip())
159
+ if cmds[0:3] == 'cd ':
160
+ print('已切换工作目录',cmds[3:])
161
+ os.chdir(cmds[3:].strip())
162
+ else:
163
+ os.system(cmds.strip())
162
164
  else:
163
- if os.name == 'posix':
164
- if cmd_par['daemonyun']:
165
- with daemon.DaemonContext():
166
- os.system(cmds)
165
+ for cmds in cmd_par['cmd'].split('&&'):
166
+ print('执行命令',cmds.strip())
167
+ if cmds[0:3] == 'cd ':
168
+ print('已切换工作目录',cmds[3:])
169
+ os.chdir(cmds[3:].strip())
167
170
  else:
168
- os.system(cmds)
169
- else:
170
- os.system(cmds)
171
+ os.system(cmds.strip())
171
172
  else:
172
- print('执行命令',cmd_par['cmd'].strip())
173
- if os.name == 'posix':
174
- if cmd_par['daemonyun']:
175
- with daemon.DaemonContext():
176
- os.system(cmd_par['cmd'].strip())
177
- else:
173
+ if os.name == 'posix' and cmd_par['daemonyun']:
174
+ with daemon.DaemonContext():
175
+ os.chdir(cmd_par['path'])
176
+ print('执行命令',cmd_par['cmd'].strip())
178
177
  os.system(cmd_par['cmd'].strip())
179
178
  else:
179
+ print('执行命令',cmd_par['cmd'].strip())
180
180
  os.system(cmd_par['cmd'].strip())
181
+
181
182
 
182
183
  return cmd_par
183
184
  def temp_get_file(folder='./',lists=[]):
@@ -358,15 +359,18 @@ def cllfunction():
358
359
  else:
359
360
  save_route_cli_pid('pid/'+fdgrsgrsegsrsgrsbsdbftbrsbfdrtrtbdfsrsgr1+'_server_pid')
360
361
  from gunicorn.app.wsgiapp import run
362
+ import re
361
363
  sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$','',sys.argv[0])
362
364
  sys.argv=[sys.argv[0], '-w', str(cmd_par['processcount']), '-b', cmd_par['host']+':'+str(cmd_par['port']),'-t',cmd_par['timeout'], 'server:'+cmd_par['appname']]
363
365
  if cmd_par['daemonyun']:
364
366
  with daemon.DaemonContext():
367
+ os.chdir(cmd_par['path'])
365
368
  sys.exit(run())
366
369
  exit()
367
370
  else:
368
371
  sys.exit(run())
369
372
  exit()
373
+
370
374
  else:
371
375
  raise Exception('不支持该操作系统')
372
376
  elif cmd_par['install'] or cmd_par['pack'] or cmd_par['upload'] or cmd_par['uninstall']:
@@ -506,11 +510,13 @@ def cllfunction():
506
510
  if os.name == 'posix':
507
511
  if cmd_par['daemonyun']:
508
512
  with daemon.DaemonContext():
513
+ os.chdir(cmd_par['path'])
509
514
  app.cli(RAW_URI)
510
515
  else:
511
516
  app.cli(RAW_URI)
512
517
  else:
513
518
  app.cli(RAW_URI)
519
+
514
520
  else:#通过命令行执行控制器的方法
515
521
  config.app['cli']=True
516
522
  try:
@@ -545,6 +551,7 @@ def cllfunction():
545
551
  if os.name == 'posix':
546
552
  if cmd_par['daemonyun']:
547
553
  with daemon.DaemonContext():
554
+ os.chdir(cmd_par['path'])
548
555
  app.cli(RAW_URI)
549
556
  else:
550
557
  app.cli(RAW_URI)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kunapi
3
- Version: 1.17
3
+ Version: 1.19
4
4
  Summary: kunapi
5
5
  Home-page: https://docs.kwebapp.cn/index/index/2
6
6
  Author: 百里-坤坤
@@ -8,7 +8,7 @@ Author-email: fengkun01@qq.com
8
8
  Maintainer: 坤坤
9
9
  Maintainer-email: fengkun01@qq.com
10
10
  License: MIT License
11
- Keywords: kunapi1.17
11
+ Keywords: kunapi1.19
12
12
  Requires-Dist: gunicorn==20.0.4
13
13
  Requires-Dist: waitress==3.0.0
14
14
  Requires-Dist: watchdog==4.0.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes