kunapi 1.14__tar.gz → 1.15__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.14 → kunapi-1.15}/PKG-INFO +2 -2
  2. {kunapi-1.14 → kunapi-1.15}/kunapi/__init__.py +1 -1
  3. {kunapi-1.14 → kunapi-1.15}/kunapi/kunapi.py +35 -32
  4. {kunapi-1.14 → kunapi-1.15}/kunapi.egg-info/PKG-INFO +2 -2
  5. {kunapi-1.14 → kunapi-1.15}/kunapi/Events.py +0 -0
  6. {kunapi-1.14 → kunapi-1.15}/kunapi/app.py +0 -0
  7. {kunapi-1.14 → kunapi-1.15}/kunapi/common/__init__.py +0 -0
  8. {kunapi-1.14 → kunapi-1.15}/kunapi/common/autoload.py +0 -0
  9. {kunapi-1.14 → kunapi-1.15}/kunapi/common/globals.py +0 -0
  10. {kunapi-1.14 → kunapi-1.15}/kunapi/common/request.py +0 -0
  11. {kunapi-1.14 → kunapi-1.15}/kunapi/config/__init__.py +0 -0
  12. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/__init__.py +0 -0
  13. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/common/__init__.py +0 -0
  14. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/common/autoload.py +0 -0
  15. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/common/model.py +0 -0
  16. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/config/__init__.py +0 -0
  17. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/config/app.py +0 -0
  18. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/index/__init__.py +0 -0
  19. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/index/common/__init__.py +0 -0
  20. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/index/common/autoload.py +0 -0
  21. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/index/controller/__init__.py +0 -0
  22. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/index/controller/index/__init__.py +0 -0
  23. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/index/controller/index/common/__init__.py +0 -0
  24. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/index/controller/index/common/autoload.py +0 -0
  25. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/index/controller/index/common/model.py +0 -0
  26. {kunapi-1.14 → kunapi-1.15}/kunapi/tempfile/kunapi/app/index/controller/index/index.py +0 -0
  27. {kunapi-1.14 → kunapi-1.15}/kunapi.egg-info/SOURCES.txt +0 -0
  28. {kunapi-1.14 → kunapi-1.15}/kunapi.egg-info/dependency_links.txt +0 -0
  29. {kunapi-1.14 → kunapi-1.15}/kunapi.egg-info/entry_points.txt +0 -0
  30. {kunapi-1.14 → kunapi-1.15}/kunapi.egg-info/requires.txt +0 -0
  31. {kunapi-1.14 → kunapi-1.15}/kunapi.egg-info/top_level.txt +0 -0
  32. {kunapi-1.14 → kunapi-1.15}/setup.cfg +0 -0
  33. {kunapi-1.14 → kunapi-1.15}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kunapi
3
- Version: 1.14
3
+ Version: 1.15
4
4
  Summary: kunapi
5
5
  Home-page: https://docs.kwebapp.cn/index/index/2
6
6
  Author: 百里-坤坤
@@ -8,6 +8,6 @@ Author-email: fengkun01@qq.com
8
8
  Maintainer: 坤坤
9
9
  Maintainer-email: fengkun01@qq.com
10
10
  License: MIT License
11
- Keywords: kunapi1.14
11
+ Keywords: kunapi1.15
12
12
 
13
13
  kunapi
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = '1.14'
2
+ __version__ = '1.15'
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,45 +140,43 @@ 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
  return cmd_par
@@ -363,6 +363,7 @@ def cllfunction():
363
363
  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']]
364
364
  if cmd_par['daemonyun']:
365
365
  with daemon.DaemonContext():
366
+ os.chdir(cmd_par['path'])
366
367
  sys.exit(run())
367
368
  exit()
368
369
  else:
@@ -506,6 +507,7 @@ def cllfunction():
506
507
  if os.name == 'posix':
507
508
  if cmd_par['daemonyun']:
508
509
  with daemon.DaemonContext():
510
+ os.chdir(cmd_par['path'])
509
511
  app.cli(RAW_URI)
510
512
  else:
511
513
  app.cli(RAW_URI)
@@ -544,6 +546,7 @@ def cllfunction():
544
546
  if os.name == 'posix':
545
547
  if cmd_par['daemonyun']:
546
548
  with daemon.DaemonContext():
549
+ os.chdir(cmd_par['path'])
547
550
  app.cli(RAW_URI)
548
551
  else:
549
552
  app.cli(RAW_URI)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kunapi
3
- Version: 1.14
3
+ Version: 1.15
4
4
  Summary: kunapi
5
5
  Home-page: https://docs.kwebapp.cn/index/index/2
6
6
  Author: 百里-坤坤
@@ -8,6 +8,6 @@ Author-email: fengkun01@qq.com
8
8
  Maintainer: 坤坤
9
9
  Maintainer-email: fengkun01@qq.com
10
10
  License: MIT License
11
- Keywords: kunapi1.14
11
+ Keywords: kunapi1.15
12
12
 
13
13
  kunapi
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