bakefile 0.0.11__py3-none-any.whl → 0.0.13__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.
- bake/ui/console.py +4 -1
- bake/ui/run/run.py +7 -0
- {bakefile-0.0.11.dist-info → bakefile-0.0.13.dist-info}/METADATA +1 -1
- {bakefile-0.0.11.dist-info → bakefile-0.0.13.dist-info}/RECORD +9 -9
- bakelib/space/lib.py +15 -4
- bakelib/space/python.py +0 -5
- bakelib/space/python_lib.py +4 -0
- {bakefile-0.0.11.dist-info → bakefile-0.0.13.dist-info}/WHEEL +0 -0
- {bakefile-0.0.11.dist-info → bakefile-0.0.13.dist-info}/entry_points.txt +0 -0
bake/ui/console.py
CHANGED
|
@@ -4,6 +4,7 @@ from typing import Any
|
|
|
4
4
|
|
|
5
5
|
from beautysh import BashFormatter
|
|
6
6
|
from rich.console import Console
|
|
7
|
+
from rich.text import Text
|
|
7
8
|
|
|
8
9
|
from bake.utils.settings import bake_settings
|
|
9
10
|
|
|
@@ -75,7 +76,9 @@ def echo(message: Any, **kwargs) -> None:
|
|
|
75
76
|
|
|
76
77
|
def cmd(cmd_str: str, **kwargs) -> None:
|
|
77
78
|
arrow = "❯" if _supports_unicode() else ">" # noqa: RUF001
|
|
78
|
-
|
|
79
|
+
arrow_text = Text(arrow, style=BOLD_GREEN)
|
|
80
|
+
cmd_text = Text(f"{cmd_str}")
|
|
81
|
+
err.print(arrow_text, cmd_text, **kwargs)
|
|
79
82
|
|
|
80
83
|
|
|
81
84
|
def script_block(title: str, script: str, **kwargs) -> None:
|
bake/ui/run/run.py
CHANGED
|
@@ -410,6 +410,13 @@ def _prepare_subprocess_env(env: dict[str, str] | None = None) -> dict[str, str]
|
|
|
410
410
|
merged_env.update(env)
|
|
411
411
|
merged_env.setdefault("FORCE_COLOR", "1")
|
|
412
412
|
merged_env.setdefault("CLICOLOR_FORCE", "1")
|
|
413
|
+
|
|
414
|
+
# Disable progress indicators for tools that support it
|
|
415
|
+
merged_env.setdefault("UV_NO_PROGRESS", "1") # uv
|
|
416
|
+
merged_env.setdefault("NPM_CONFIG_PROGRESS", "false") # npm
|
|
417
|
+
merged_env.setdefault("PIP_PROGRESS_BAR", "off") # pip
|
|
418
|
+
merged_env.setdefault("CARGO_TERM_PROGRESS_WHEN", "never") # cargo
|
|
419
|
+
|
|
413
420
|
try:
|
|
414
421
|
terminal_size = os.get_terminal_size()
|
|
415
422
|
merged_env.setdefault("COLUMNS", str(terminal_size.columns))
|
|
@@ -35,14 +35,14 @@ bake/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
35
35
|
bake/samples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
36
|
bake/samples/simple.py,sha256=hP2TW-D7BQBGJseqRPpilxkoQ8ScTuZZePICupyvFKA,155
|
|
37
37
|
bake/ui/__init__.py,sha256=6OhZVKjfC9aumbhraxkGtx7KLpV1ouepeHRA2dUVoSo,209
|
|
38
|
-
bake/ui/console.py,sha256=
|
|
38
|
+
bake/ui/console.py,sha256=xy33rO2tLSkCFjyC_omClkbkXxwZmNL54wWzl7eXGlw,3349
|
|
39
39
|
bake/ui/logger/__init__.py,sha256=bup2cssTHhergh47s6uYbGtY2dJNxlKKH6otBc4ECFM,728
|
|
40
40
|
bake/ui/logger/capsys.py,sha256=KZL6k7Werp_8styfJKfIvQyv0-gJq54vY3hSJFIacEM,5267
|
|
41
41
|
bake/ui/logger/setup.py,sha256=OrX9UiY0iBGfWWfhMJCdfqCRJsL5yC3rIdIEOn7rveo,1377
|
|
42
42
|
bake/ui/logger/utils.py,sha256=dcppxoS_pX92AFcHIerJGI2_JBHBNghRQmQqlZmmj2Q,7218
|
|
43
43
|
bake/ui/params.py,sha256=yNDChJQkbeZSxQzXTSBrAPCbwsJ5zOK4s4sFHQPSnHs,140
|
|
44
44
|
bake/ui/run/__init__.py,sha256=A671l5YVTRAtS47ewvaMCNwPRim_Wkof1am0WibxA2I,205
|
|
45
|
-
bake/ui/run/run.py,sha256=
|
|
45
|
+
bake/ui/run/run.py,sha256=2qMK3wO_Tyx36sy7Ai-609WqOweYbrTduTYD4IzoSzU,19156
|
|
46
46
|
bake/ui/run/script.py,sha256=fk7KiDklYDYpFGkH3wu-hZGI4OnvgcB8z5jtNt41Hg0,2263
|
|
47
47
|
bake/ui/run/splitter.py,sha256=L6uCU3bzpoMgj891Q1BZnOtiWF07QFDcCOx9RyUqHKk,9198
|
|
48
48
|
bake/ui/run/uv.py,sha256=LC1Eo3rbmRug8_MsmXxZYVGWcyr79WGzFfXQrEwtWH0,1810
|
|
@@ -62,11 +62,11 @@ bakelib/refreshable_cache/cache.py,sha256=P8gX63FP1vgdwNOwKLf-U0ly1P1LvNsB7KqDS9
|
|
|
62
62
|
bakelib/refreshable_cache/exceptions.py,sha256=d15dd0RbapXneWZpDwfvDt7k49cB6jZBMxULi5DLU9Q,97
|
|
63
63
|
bakelib/space/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
64
|
bakelib/space/base.py,sha256=7vwVw19hkPimvamvTVySkc7Ndk8san3EF_5pg-8jf7w,6260
|
|
65
|
-
bakelib/space/lib.py,sha256=
|
|
66
|
-
bakelib/space/python.py,sha256=
|
|
67
|
-
bakelib/space/python_lib.py,sha256=
|
|
65
|
+
bakelib/space/lib.py,sha256=2vjR5qLA-a6-WYUb_ii0oJdgB2fj3-kHtvmRB88203A,6007
|
|
66
|
+
bakelib/space/python.py,sha256=LRe6sNDJ6_iNv3bt2rJqp-gLzNiv3MgoN5XRyiIdmcw,3284
|
|
67
|
+
bakelib/space/python_lib.py,sha256=x-htl7p_O_sSGG9GyusrjmYtYraZUTfwRPhJaclbF6I,2820
|
|
68
68
|
bakelib/space/utils.py,sha256=Mp82CgpNMeG76slXaDs9GXa1r_ugoiJICvpsOaH_2tg,3206
|
|
69
|
-
bakefile-0.0.
|
|
70
|
-
bakefile-0.0.
|
|
71
|
-
bakefile-0.0.
|
|
72
|
-
bakefile-0.0.
|
|
69
|
+
bakefile-0.0.13.dist-info/WHEEL,sha256=fAguSjoiATBe7TNBkJwOjyL1Tt4wwiaQGtNtjRPNMQA,80
|
|
70
|
+
bakefile-0.0.13.dist-info/entry_points.txt,sha256=Ecvvh7BYHCPJ0UdntrDc3Od6AZdRPXN5Z7o_7ok_0Qw,107
|
|
71
|
+
bakefile-0.0.13.dist-info/METADATA,sha256=b2hySKTOpcJiGFCnx1JFS8N3yuCcpxt9WTVJbqRyJCk,2464
|
|
72
|
+
bakefile-0.0.13.dist-info/RECORD,,
|
bakelib/space/lib.py
CHANGED
|
@@ -92,11 +92,15 @@ class BaseLibSpace(BaseSpace):
|
|
|
92
92
|
def _version_schema(self) -> str | None:
|
|
93
93
|
return None
|
|
94
94
|
|
|
95
|
+
@property
|
|
96
|
+
def _version_output_format(self) -> str | None:
|
|
97
|
+
return None
|
|
98
|
+
|
|
95
99
|
def _is_auth_failure(self, result: subprocess.CompletedProcess[str]) -> bool:
|
|
96
100
|
return result.returncode != 0
|
|
97
101
|
|
|
98
102
|
def _determine_version(self, ctx: Context, version: str | None) -> str:
|
|
99
|
-
return version if version else self.zerv_versioning(ctx
|
|
103
|
+
return version if version else self.zerv_versioning(ctx)
|
|
100
104
|
|
|
101
105
|
@command(help="Build and publish the package")
|
|
102
106
|
def publish(
|
|
@@ -150,9 +154,16 @@ class BaseLibSpace(BaseSpace):
|
|
|
150
154
|
"set the BAKE_PUBLISH_TOKEN environment variable"
|
|
151
155
|
)
|
|
152
156
|
|
|
153
|
-
def zerv_versioning(
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
def zerv_versioning(
|
|
158
|
+
self, ctx: Context, *, schema: str | None = None, output_format: str | None = None
|
|
159
|
+
) -> str:
|
|
160
|
+
schema = schema if schema is not None else self._version_schema
|
|
161
|
+
output_format = output_format if output_format is not None else self._version_output_format
|
|
162
|
+
|
|
163
|
+
schema_flag = f" --schema {schema}" if schema else ""
|
|
164
|
+
output_format_flag = f" --output-format {output_format}" if output_format else ""
|
|
165
|
+
|
|
166
|
+
result = ctx.run(f"zerv flow{schema_flag}{output_format_flag}", dry_run=False)
|
|
156
167
|
return strip_ansi(result.stdout.strip())
|
|
157
168
|
|
|
158
169
|
def _get_tools(self) -> dict[str, ToolInfo]:
|
bakelib/space/python.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import os
|
|
2
1
|
from pathlib import Path
|
|
3
2
|
|
|
4
3
|
from bake import Context, params
|
|
@@ -16,10 +15,6 @@ def _get_python_version() -> str | None:
|
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
class PythonSpace(BaseSpace):
|
|
19
|
-
def __init__(self) -> None:
|
|
20
|
-
super().__init__()
|
|
21
|
-
os.environ["UV_NO_PROGRESS"] = "true"
|
|
22
|
-
|
|
23
18
|
def _get_tools(self) -> dict[str, ToolInfo]:
|
|
24
19
|
tools = super()._get_tools()
|
|
25
20
|
tools["python"] = ToolInfo(
|
bakelib/space/python_lib.py
CHANGED
|
@@ -18,6 +18,10 @@ class PythonLibSpace(PythonSpace, BaseLibSpace):
|
|
|
18
18
|
def _version_schema(self) -> str | None:
|
|
19
19
|
return "standard-base-prerelease-post-dev"
|
|
20
20
|
|
|
21
|
+
@property
|
|
22
|
+
def _version_output_format(self) -> str | None:
|
|
23
|
+
return "pep440"
|
|
24
|
+
|
|
21
25
|
def _registry_to_index(self, registry: str) -> PublishIndex:
|
|
22
26
|
valid_indices = get_args(PublishIndex)
|
|
23
27
|
if registry not in valid_indices:
|
|
File without changes
|
|
File without changes
|