bcmd 0.4.6__py3-none-any.whl → 0.4.7__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/venv.py +9 -5
- {bcmd-0.4.6.dist-info → bcmd-0.4.7.dist-info}/METADATA +1 -1
- {bcmd-0.4.6.dist-info → bcmd-0.4.7.dist-info}/RECORD +6 -6
- {bcmd-0.4.6.dist-info → bcmd-0.4.7.dist-info}/WHEEL +0 -0
- {bcmd-0.4.6.dist-info → bcmd-0.4.7.dist-info}/entry_points.txt +0 -0
- {bcmd-0.4.6.dist-info → bcmd-0.4.7.dist-info}/top_level.txt +0 -0
bcmd/tasks/venv.py
CHANGED
|
@@ -27,11 +27,13 @@ async def venv(
|
|
|
27
27
|
path: Path = typer.Option(None, '--path', help='指定路径,默认当前目录'),
|
|
28
28
|
isOfficial: bool = typer.Option(False, '--official', help='是否使用官方地址安装(https://pypi.org/simple)'),
|
|
29
29
|
isNewProject: bool = typer.Option(False, '--new-project', help='是否新建项目'),
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
isUseBase: bool = typer.Option(False, '--use-base', help='是否强制使用基础库去安装'),
|
|
31
|
+
isReBase: bool = typer.Option(False, '--re-base', help='是否先清空venv目录再使用基础库去安装'),
|
|
32
|
+
isUseLock: bool = typer.Option(False, '--use-lock', help='是否使用锁定库安装'),
|
|
33
|
+
isReLock: bool = typer.Option(False, '--re-lock', help='是否先清空venv目录再使用锁定库安装'),
|
|
32
34
|
):
|
|
33
35
|
'python 虚拟环境配置'
|
|
34
|
-
btask.check(not (
|
|
36
|
+
btask.check(not (isUseBase == isReBase == isUseLock == isReLock == True), '4个选项只能选择其中一个 --use-base / --re-base / --use-lock / --re-lock')
|
|
35
37
|
path = path or Path(os.getcwd())
|
|
36
38
|
binPath = path / 'bin'
|
|
37
39
|
binListFile = bpath.get(path, 'bin.list')
|
|
@@ -40,7 +42,7 @@ async def venv(
|
|
|
40
42
|
venvFile = bpath.get(path, '.venv')
|
|
41
43
|
checkFileOrNotExists(venvFile)
|
|
42
44
|
await _inputQiniuPassword(binListFile, binPath)
|
|
43
|
-
if
|
|
45
|
+
if isReBase or isReLock:
|
|
44
46
|
bpath.remove(venvPath)
|
|
45
47
|
btask.check(not venvPath.exists(), f'无法删除 venv 目录 {venvPath}')
|
|
46
48
|
packages = packages or []
|
|
@@ -54,8 +56,10 @@ async def venv(
|
|
|
54
56
|
if not venvFile.exists():
|
|
55
57
|
await bfile.writeText(venvFile, '')
|
|
56
58
|
basePackages, lockPackages = await getPackageList(venvFile)
|
|
57
|
-
if
|
|
59
|
+
if isUseBase or isReBase:
|
|
58
60
|
installPackages = _mergePackageList(basePackages, packages)
|
|
61
|
+
elif isUseLock or isReLock:
|
|
62
|
+
installPackages = _mergePackageList(lockPackages, packages)
|
|
59
63
|
else:
|
|
60
64
|
installPackages = _mergePackageList(lockPackages or basePackages, packages)
|
|
61
65
|
installPackages = sorted(list(set(installPackages)))
|
|
@@ -22,9 +22,9 @@ bcmd/tasks/mirror.py,sha256=-ztGkkxVk81npIo4cpmyLdHa1w4ZFdiJ3mv5WIBMI5Y,1556
|
|
|
22
22
|
bcmd/tasks/project.py,sha256=ESWyRvRu4tesoYrlBtYMrQvQoxzMnFkI-jTN2hsYruI,939
|
|
23
23
|
bcmd/tasks/proxy.py,sha256=mdiBR2vah5qKt9o7dXE7rg8Lz_A6GheVJDts0m1gmSs,1324
|
|
24
24
|
bcmd/tasks/time.py,sha256=nSIVYov2LsGdxsZAtC91UKXcUtVAqR9o-JmzeuevFhA,2586
|
|
25
|
-
bcmd/tasks/venv.py,sha256=
|
|
26
|
-
bcmd-0.4.
|
|
27
|
-
bcmd-0.4.
|
|
28
|
-
bcmd-0.4.
|
|
29
|
-
bcmd-0.4.
|
|
30
|
-
bcmd-0.4.
|
|
25
|
+
bcmd/tasks/venv.py,sha256=Metps2tKu_wyZfezMTvQPInAWgQV6FyRW9l4-WS9lk8,7160
|
|
26
|
+
bcmd-0.4.7.dist-info/METADATA,sha256=PLqFGXVEpVWeo8M0qwIik_e5dHmkL40BxC1CvIV6aPo,486
|
|
27
|
+
bcmd-0.4.7.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
28
|
+
bcmd-0.4.7.dist-info/entry_points.txt,sha256=rHJrP6KEQpB-YaQqDFzEL2v88r03rxSfnzAayRvAqHU,39
|
|
29
|
+
bcmd-0.4.7.dist-info/top_level.txt,sha256=-KrvhhtBcYsm4XhcjQvEcFbBB3VXeep7d3NIfDTrXKQ,5
|
|
30
|
+
bcmd-0.4.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|