ryry-cli 2.1__tar.gz → 2.2__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.
- {ryry_cli-2.1/ryry_cli.egg-info → ryry_cli-2.2}/PKG-INFO +1 -1
- ryry_cli-2.2/ryry/constant.py +5 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/ryry_widget.py +33 -15
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/utils.py +2 -0
- {ryry_cli-2.1 → ryry_cli-2.2/ryry_cli.egg-info}/PKG-INFO +1 -1
- {ryry_cli-2.1 → ryry_cli-2.2}/setup.py +1 -1
- ryry_cli-2.1/ryry/constant.py +0 -5
- {ryry_cli-2.1 → ryry_cli-2.2}/LICENSE +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/README.md +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/__init__.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/main.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/ryry_server_socket.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/ryry_service.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/ryry_webapi.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/script_template/main.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/script_template/run.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/server_func.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/store.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/task.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/taskUtils.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry/upload.py +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry_cli.egg-info/requires.txt +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-2.1 → ryry_cli-2.2}/setup.cfg +0 -0
|
@@ -41,12 +41,17 @@ def compare_versions(version1, version2):
|
|
|
41
41
|
|
|
42
42
|
def _remote_package_version(py_package):
|
|
43
43
|
remote_version = ""
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
for pip in ["pip3","pip"]:
|
|
45
|
+
result = subprocess.run(f"pip index versions {py_package} -i https://pypi.python.org/simple/",
|
|
46
|
+
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
47
|
+
ss = result.stdout.decode(encoding="utf8", errors="ignore").split("\n")
|
|
48
|
+
for s in ss:
|
|
49
|
+
if "LATEST:" in s.strip():
|
|
50
|
+
remote_version = s.replace("LATEST:", "").strip()
|
|
51
|
+
break
|
|
52
|
+
else:
|
|
53
|
+
continue
|
|
54
|
+
break
|
|
50
55
|
return remote_version
|
|
51
56
|
|
|
52
57
|
#real time version get
|
|
@@ -55,15 +60,20 @@ def _local_package_version(py_package):
|
|
|
55
60
|
if platform.system() == 'Windows':
|
|
56
61
|
find_str = "findstr"
|
|
57
62
|
local_version = ""
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if
|
|
66
|
-
|
|
63
|
+
for pip in ["pip3","pip"]:
|
|
64
|
+
result = subprocess.run(f"{pip} list | {find_str} {py_package}",
|
|
65
|
+
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
66
|
+
ss = result.stdout.decode(encoding="utf8", errors="ignore").split("\n")
|
|
67
|
+
for s in ss:
|
|
68
|
+
s = re.sub(r'\s+', ' ', s)
|
|
69
|
+
sl = s.strip().split(" ")
|
|
70
|
+
if len(sl) == 2:
|
|
71
|
+
if py_package.strip() == sl[0].strip():
|
|
72
|
+
local_version = sl[1].strip()
|
|
73
|
+
break
|
|
74
|
+
else:
|
|
75
|
+
continue
|
|
76
|
+
break
|
|
67
77
|
return local_version
|
|
68
78
|
|
|
69
79
|
def _pypi_folder_name(name):
|
|
@@ -312,9 +322,11 @@ setuptools.setup(
|
|
|
312
322
|
subprocess.run(f"python {setup_py} sdist bdist_wheel", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, cwd=pip_dir, encoding="utf-8")
|
|
313
323
|
#uninstall
|
|
314
324
|
subprocess.run(f"pip uninstall {name} -y", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, encoding="utf-8")
|
|
325
|
+
subprocess.run(f"pip3 uninstall {name} -y", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, encoding="utf-8")
|
|
315
326
|
#install
|
|
316
327
|
whl = utils.firstExitWithDir(os.path.join(pip_dir, "dist"), "whl")
|
|
317
328
|
subprocess.run(f"pip install {whl} --extra-index-url https://pypi.python.org/simple/", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, encoding="utf-8")
|
|
329
|
+
subprocess.run(f"pip3 install {whl} --extra-index-url https://pypi.python.org/simple/", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, encoding="utf-8")
|
|
318
330
|
#upload
|
|
319
331
|
ryry_webapi.uploadWidget(widget_id, name, whl, ".whl", local_version)
|
|
320
332
|
print(f"发布 {name}_{local_version} -> 成功")
|
|
@@ -365,8 +377,11 @@ def UpdateWidgetFromPypi():
|
|
|
365
377
|
if compare_versions(remote_version, local_version) > 0:
|
|
366
378
|
#update
|
|
367
379
|
subprocess.run(f"pip uninstall {py_package} -y", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
380
|
+
subprocess.run(f"pip3 uninstall {py_package} -y", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
368
381
|
subprocess.run(f"pip install {package_url} -i https://pypi.python.org/simple/ --extra-index-url https://pypi.python.org/simple/",
|
|
369
382
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
383
|
+
subprocess.run(f"pip3 install {package_url} -i https://pypi.python.org/simple/ --extra-index-url https://pypi.python.org/simple/",
|
|
384
|
+
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
370
385
|
widgetUpdateNotify(py_package, local_version, remote_version)
|
|
371
386
|
except Exception as ex:
|
|
372
387
|
print(ex)
|
|
@@ -381,8 +396,11 @@ def installWidget(name):
|
|
|
381
396
|
if compare_versions(remote_version, local_version) > 0:
|
|
382
397
|
#update
|
|
383
398
|
subprocess.run(f"pip uninstall {name} -y", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
399
|
+
subprocess.run(f"pip3 uninstall {name} -y", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
384
400
|
subprocess.run(f"pip install {package_url} -i https://pypi.python.org/simple/ --extra-index-url https://pypi.python.org/simple/",
|
|
385
401
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
402
|
+
subprocess.run(f"pip3 install {package_url} -i https://pypi.python.org/simple/ --extra-index-url https://pypi.python.org/simple/",
|
|
403
|
+
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
386
404
|
widgetInstallNotify(name, remote_version)
|
|
387
405
|
addWidgetToEnv(name)
|
|
388
406
|
|
|
@@ -286,7 +286,9 @@ start /B {restart_command}''')
|
|
|
286
286
|
if update_cli:
|
|
287
287
|
f.write(f'''#!/bin/bash
|
|
288
288
|
pip uninstall ryry-cli -y
|
|
289
|
+
pip3 uninstall ryry-cli -y
|
|
289
290
|
pip install -U ryry-cli -i {simple} --extra-index-url https://pypi.python.org/simple/
|
|
291
|
+
pip3 install -U ryry-cli -i {simple} --extra-index-url https://pypi.python.org/simple/
|
|
290
292
|
nohup {restart_command} &''')
|
|
291
293
|
else:
|
|
292
294
|
f.write(f'''#!/bin/bash
|
ryry_cli-2.1/ryry/constant.py
DELETED
|
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
|
|
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
|
|
File without changes
|