bcmd 0.5.5__py3-none-any.whl → 0.5.6__py3-none-any.whl
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.
Potentially problematic release.
This version of bcmd might be problematic. Click here for more details.
- bcmd/tasks/__init__.py +1 -0
- bcmd/tasks/lib.py +2 -2
- bcmd/tasks/proxy.py +1 -1
- bcmd/tasks/upgrade.py +18 -0
- bcmd/tasks/venv.py +1 -0
- {bcmd-0.5.5.dist-info → bcmd-0.5.6.dist-info}/METADATA +2 -2
- {bcmd-0.5.5.dist-info → bcmd-0.5.6.dist-info}/RECORD +10 -9
- {bcmd-0.5.5.dist-info → bcmd-0.5.6.dist-info}/WHEEL +0 -0
- {bcmd-0.5.5.dist-info → bcmd-0.5.6.dist-info}/entry_points.txt +0 -0
- {bcmd-0.5.5.dist-info → bcmd-0.5.6.dist-info}/top_level.txt +0 -0
bcmd/tasks/__init__.py
CHANGED
bcmd/tasks/lib.py
CHANGED
|
@@ -32,7 +32,7 @@ async def tidy_dependencies(
|
|
|
32
32
|
ignoreLibAry = sorted(list(set(ignoreLibAry) & set(libAry)))
|
|
33
33
|
libAry = sorted(list(set(libAry) - set(ignoreLibAry)))
|
|
34
34
|
replaceContent = '\n'.join([f" '{x}'," for x in libAry]) + '\n' + '\n'.join([f" # '{x}'," for x in ignoreLibAry])
|
|
35
|
-
newContent = re.sub(r'dependencies = \[(.*?)\]', f"dependencies = [\n{replaceContent}\n]", oldContent, 0, re.DOTALL)
|
|
35
|
+
newContent = re.sub(r'dependencies = \[(.*?)\n\]', f"dependencies = [\n{replaceContent}\n]", oldContent, 0, re.DOTALL)
|
|
36
36
|
if oldContent != newContent:
|
|
37
37
|
await bfile.writeText(pyprojectTomlFile, newContent)
|
|
38
38
|
bcolor.printYellow(pyprojectTomlFile)
|
|
@@ -93,7 +93,7 @@ async def build(
|
|
|
93
93
|
|
|
94
94
|
def _getIgnoreLibAry(content: str) -> list[str]:
|
|
95
95
|
'获取pyproject.toml中屏蔽的第三方库'
|
|
96
|
-
content = re.findall(r'dependencies = \[(.*?)\]', content, re.DOTALL)[0]
|
|
96
|
+
content = re.findall(r'dependencies = \[(.*?)\n\]', content, re.DOTALL)[0]
|
|
97
97
|
ary = textToAry(content)
|
|
98
98
|
return sorted([x[1:].replace('"', '').replace("'", '').replace(',', '').strip() for x in filter(lambda x: x.startswith('#'), ary)])
|
|
99
99
|
|
bcmd/tasks/proxy.py
CHANGED
|
@@ -30,7 +30,7 @@ async def proxy(
|
|
|
30
30
|
elif set(['powershell.exe', 'pwsh.exe']) & set(processNameAry):
|
|
31
31
|
template = powerShellTemplate
|
|
32
32
|
|
|
33
|
-
btask.assertTrue(template, '不支持当前终端({processNameAry})')
|
|
33
|
+
btask.assertTrue(template, f'不支持当前终端({processNameAry})')
|
|
34
34
|
lineAry = textToAry(template.format(port))
|
|
35
35
|
msg = '\n'.join(lineAry)
|
|
36
36
|
bcolor.printMagenta('\r\n' + msg)
|
bcmd/tasks/upgrade.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from typing import Final
|
|
2
|
+
|
|
3
|
+
import pyperclip
|
|
4
|
+
from beni import bcolor, btask
|
|
5
|
+
from beni.bfunc import syncCall
|
|
6
|
+
|
|
7
|
+
app: Final = btask.app
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@app.command()
|
|
11
|
+
@syncCall
|
|
12
|
+
async def upgrade():
|
|
13
|
+
'使用 pipx 官方源更新 bcmd 到最新版本'
|
|
14
|
+
cmd = 'pipx upgrade bcmd -i https://pypi.org/simple'
|
|
15
|
+
pyperclip.copy(cmd + '\n')
|
|
16
|
+
bcolor.printGreen(cmd)
|
|
17
|
+
bcolor.printGreen('已复制到剪贴板(需要手动执行)')
|
|
18
|
+
bcolor.printGreen('OK')
|
bcmd/tasks/venv.py
CHANGED
|
@@ -37,6 +37,7 @@ async def install_benimang(
|
|
|
37
37
|
path: Path = typer.Option(None, '--path', help='指定路径,默认当前目录'),
|
|
38
38
|
):
|
|
39
39
|
'更新 benimang 库,强制使用官方源'
|
|
40
|
+
path = path or Path(os.getcwd())
|
|
40
41
|
pip = getPipFile(path)
|
|
41
42
|
await brun.run(f'{pip} install benimang -U -i https://pypi.org/simple', isPrint=True)
|
|
42
43
|
await _venv(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: bcmd
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.6
|
|
4
4
|
Summary: Commands for Beni
|
|
5
5
|
Author-email: Beni Mang <benimang@126.com>
|
|
6
6
|
Maintainer-email: Beni Mang <benimang@126.com>
|
|
7
7
|
Keywords: benimang,beni,bcmd
|
|
8
8
|
Requires-Python: >=3.10
|
|
9
|
-
Requires-Dist: benimang==0.7.
|
|
9
|
+
Requires-Dist: benimang==0.7.12
|
|
10
10
|
Requires-Dist: build
|
|
11
11
|
Requires-Dist: cryptography
|
|
12
12
|
Requires-Dist: pathspec
|
|
@@ -8,7 +8,7 @@ bcmd/resources/project/main.py,sha256=xdskz_sf05fYA1SRMFCIxDjx8SnegxTbCmHpW86ItL
|
|
|
8
8
|
bcmd/resources/project/.vscode/launch.json,sha256=Wpghb9lW9Y1wtrjqlTbyjeejDuU8BQJmBjwsLyPRh1g,478
|
|
9
9
|
bcmd/resources/project/.vscode/settings.json,sha256=G4rCroWxEHcQfsqIJ6CXRHI6VGr3WYQI3KPPjH_JANs,280
|
|
10
10
|
bcmd/resources/project/.vscode/tasks.json,sha256=gouhpkrqiPz7v65Jw1Rz-BCYU3sSdmphzXIYCzVnoe0,1783
|
|
11
|
-
bcmd/tasks/__init__.py,sha256=
|
|
11
|
+
bcmd/tasks/__init__.py,sha256=siqJwKgsjiIQzarBsQaucjm6VEvDr1pJDuEd7UnDXSQ,316
|
|
12
12
|
bcmd/tasks/bin.py,sha256=B_e-HYOc2Cohk-1PbKHyKn3RhI8TAUfI2EBRoFEHiTM,2961
|
|
13
13
|
bcmd/tasks/code.py,sha256=MaEnCMXiGkubslR7hLYX_8vIioN2CiEht4Nx6PtkVYY,3778
|
|
14
14
|
bcmd/tasks/crypto.py,sha256=C2welnYfdI4Tc-W1cwkboGb6bk6NGWO0MRKm4Bzo_9Q,3216
|
|
@@ -16,15 +16,16 @@ bcmd/tasks/debian.py,sha256=B9aMIIct3vNqMJr5hTr1GegXVf20H49C27FMvRRGIzI,3004
|
|
|
16
16
|
bcmd/tasks/download.py,sha256=XdZYKi8zQTNYWEgUxeTNDqPgP7IGYJkMmlDDC9u93Vk,2315
|
|
17
17
|
bcmd/tasks/image.py,sha256=Po8jpEf4e1X68oJc2MYT446o-45RgIrl1TsODvUetBo,7782
|
|
18
18
|
bcmd/tasks/json.py,sha256=WWOyvcZPYaqQgp-Tkm-uIJschNMBKPKtZN3yXz_SC5s,635
|
|
19
|
-
bcmd/tasks/lib.py,sha256=
|
|
19
|
+
bcmd/tasks/lib.py,sha256=lq-PdHxhK-5Akf7k4QaIT8mBB-sCK5or5OqEFTdphIA,4567
|
|
20
20
|
bcmd/tasks/math.py,sha256=xbl5UdaDMyAjiLodDPleP4Cutrk2S3NOAgurzAgOEAE,2862
|
|
21
21
|
bcmd/tasks/mirror.py,sha256=nAe8NYftMKzht16MFBj7RqXwvVhR6Jh2uuAyJLh87og,1098
|
|
22
22
|
bcmd/tasks/project.py,sha256=yLYL6WNmq0mlY-hQ-SGKZ6uRjwceJxpgbP-QAo0Wk-Y,1948
|
|
23
|
-
bcmd/tasks/proxy.py,sha256=
|
|
23
|
+
bcmd/tasks/proxy.py,sha256=xvxN5PClUnc5LQpmq2Wug7_LUVpJboMWLXBvL9lX7EM,1552
|
|
24
24
|
bcmd/tasks/time.py,sha256=ZiqA1jdgl-TBtFSOxxP51nwv4g9iZItmkFKpf9MKelk,2453
|
|
25
|
-
bcmd/tasks/
|
|
26
|
-
bcmd
|
|
27
|
-
bcmd-0.5.
|
|
28
|
-
bcmd-0.5.
|
|
29
|
-
bcmd-0.5.
|
|
30
|
-
bcmd-0.5.
|
|
25
|
+
bcmd/tasks/upgrade.py,sha256=ZiyecgVbnnoTU_LAsd78CIKA4ioc9so9pXpAM76b_0M,447
|
|
26
|
+
bcmd/tasks/venv.py,sha256=a7ZDyagUPQvCAXx3cZJIqJt0p1Iy5u5qmmj8iRbDQZE,7673
|
|
27
|
+
bcmd-0.5.6.dist-info/METADATA,sha256=xf6IbZCdIQKGRmxWo0Ttyz5xV5sQBuTL7rAU_CMOdGc,475
|
|
28
|
+
bcmd-0.5.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
29
|
+
bcmd-0.5.6.dist-info/entry_points.txt,sha256=rHJrP6KEQpB-YaQqDFzEL2v88r03rxSfnzAayRvAqHU,39
|
|
30
|
+
bcmd-0.5.6.dist-info/top_level.txt,sha256=-KrvhhtBcYsm4XhcjQvEcFbBB3VXeep7d3NIfDTrXKQ,5
|
|
31
|
+
bcmd-0.5.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|