machineconfig 5.99__py3-none-any.whl → 6.1__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 machineconfig might be problematic. Click here for more details.
- machineconfig/scripts/python/devops.py +1 -1
- machineconfig/utils/installer.py +1 -2
- machineconfig/utils/installer_utils/installer.py +37 -12
- {machineconfig-5.99.dist-info → machineconfig-6.1.dist-info}/METADATA +1 -1
- {machineconfig-5.99.dist-info → machineconfig-6.1.dist-info}/RECORD +8 -8
- {machineconfig-5.99.dist-info → machineconfig-6.1.dist-info}/WHEEL +0 -0
- {machineconfig-5.99.dist-info → machineconfig-6.1.dist-info}/entry_points.txt +0 -0
- {machineconfig-5.99.dist-info → machineconfig-6.1.dist-info}/top_level.txt +0 -0
|
@@ -10,7 +10,7 @@ import machineconfig.scripts.python.devops_helpers.cli_data as cli_data
|
|
|
10
10
|
import machineconfig.scripts.python.devops_helpers.cli_nw as cli_network
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
def install(which: Annotated[Optional[str], typer.Argument(..., help="Comma-separated list of program names to install, or group name if --group flag is set.")],
|
|
13
|
+
def install(which: Annotated[Optional[str], typer.Argument(..., help="Comma-separated list of program names to install, or group name if --group flag is set.")] = None,
|
|
14
14
|
group: Annotated[bool, typer.Option(..., "--group", "-g", help="Treat 'which' as a group name. A group is bundle of apps.")] = False,
|
|
15
15
|
interactive: Annotated[bool, typer.Option(..., "--interactive", "-ia", help="Interactive selection of programs to install.")] = False,
|
|
16
16
|
) -> None:
|
machineconfig/utils/installer.py
CHANGED
|
@@ -125,10 +125,9 @@ def get_all_installer_data_files() -> list[InstallerData]:
|
|
|
125
125
|
return res_final
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
def
|
|
128
|
+
def dynamically_extract_installers_system_groups_from_scripts():
|
|
129
129
|
res_final: list[InstallerData] = []
|
|
130
130
|
from platform import system
|
|
131
|
-
|
|
132
131
|
if system() == "Windows":
|
|
133
132
|
options_system = parse_apps_installer_windows(LIBRARY_ROOT.joinpath("setup_windows/apps.ps1").read_text(encoding="utf-8"))
|
|
134
133
|
elif system() == "Linux" or system() == "Darwin":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Devops Devapps Install"""
|
|
2
2
|
|
|
3
|
-
from machineconfig.utils.installer import
|
|
3
|
+
from machineconfig.utils.installer import dynamically_extract_installers_system_groups_from_scripts
|
|
4
4
|
import typer
|
|
5
5
|
from rich.console import Console
|
|
6
6
|
from rich.panel import Panel
|
|
@@ -68,6 +68,26 @@ def main(
|
|
|
68
68
|
return install_group(package_group=a_group)
|
|
69
69
|
else:
|
|
70
70
|
return install_clis(clis_names=[x.strip() for x in which.split(",") if x.strip() != ""])
|
|
71
|
+
else:
|
|
72
|
+
if group:
|
|
73
|
+
typer.echo("❌ You must provide a group name when using the --group/-g option.")
|
|
74
|
+
res = get_static_groups_combined_with_dynamic_groups_extracted()
|
|
75
|
+
console.print("[bold blue]Here are the available groups:[/bold blue]")
|
|
76
|
+
table = Table(show_header=True, header_style="bold magenta")
|
|
77
|
+
table.add_column("Group", style="cyan", no_wrap=True)
|
|
78
|
+
table.add_column("AppsBundled", style="green", overflow="fold")
|
|
79
|
+
for display, group_name in res.items():
|
|
80
|
+
# Parse display
|
|
81
|
+
if " -- " in display:
|
|
82
|
+
group_part, items_part = display.split(" -- ", 1)
|
|
83
|
+
group_name_parsed = group_part.replace("📦 ", "").strip()
|
|
84
|
+
items_str = items_part.strip()
|
|
85
|
+
else:
|
|
86
|
+
group_name_parsed = display
|
|
87
|
+
items_str = group_name
|
|
88
|
+
table.add_row(group_name_parsed, items_str)
|
|
89
|
+
console.print(table)
|
|
90
|
+
raise typer.Exit(1)
|
|
71
91
|
typer.echo("❌ You must provide either a program name/group name, or use --interactive/-ia option.")
|
|
72
92
|
import click
|
|
73
93
|
ctx = click.get_current_context()
|
|
@@ -75,6 +95,19 @@ def main(
|
|
|
75
95
|
raise typer.Exit(1)
|
|
76
96
|
|
|
77
97
|
|
|
98
|
+
def get_static_groups_combined_with_dynamic_groups_extracted():
|
|
99
|
+
# Build category options and maintain a mapping from display text to actual category name
|
|
100
|
+
category_display_to_name: dict[str, str] = {}
|
|
101
|
+
for group_name, group_values in PACKAGE_GROUP2NAMES.items():
|
|
102
|
+
display = f"📦 {group_name:<20}" + " -- " + f"{'|'.join(group_values):<60}"
|
|
103
|
+
category_display_to_name[display] = group_name
|
|
104
|
+
options_system = dynamically_extract_installers_system_groups_from_scripts()
|
|
105
|
+
for item in options_system:
|
|
106
|
+
display = f"📦 {item['appName']:<20} -- {item['doc']:<60}"
|
|
107
|
+
category_display_to_name[display] = item['appName']
|
|
108
|
+
return category_display_to_name
|
|
109
|
+
|
|
110
|
+
|
|
78
111
|
def install_interactively():
|
|
79
112
|
from machineconfig.utils.options import choose_from_options
|
|
80
113
|
from machineconfig.utils.schemas.installer.installer_types import get_normalized_arch, get_os_name
|
|
@@ -84,16 +117,8 @@ def install_interactively():
|
|
|
84
117
|
installer_options = []
|
|
85
118
|
for x in installers:
|
|
86
119
|
installer_options.append(Installer(installer_data=x).get_description())
|
|
87
|
-
|
|
88
|
-
category_display_to_name
|
|
89
|
-
for group_name, group_values in PACKAGE_GROUP2NAMES.items():
|
|
90
|
-
display = f"📦 {group_name:<20}" + " -- " + f"{'|'.join(group_values):<60}"
|
|
91
|
-
category_display_to_name[display] = group_name
|
|
92
|
-
options_system = get_installers_system_groups()
|
|
93
|
-
for item in options_system:
|
|
94
|
-
display = f"📦 {item['appName']:<20} -- {item['doc']:<60}"
|
|
95
|
-
category_display_to_name[display] = item['appName']
|
|
96
|
-
|
|
120
|
+
|
|
121
|
+
category_display_to_name = get_static_groups_combined_with_dynamic_groups_extracted()
|
|
97
122
|
options = list(category_display_to_name.keys()) + ["─" * 50] + installer_options
|
|
98
123
|
program_names = choose_from_options(multi=True, msg="Categories are prefixed with 📦", options=options, header="🚀 CHOOSE DEV APP OR CATEGORY", default="📦 essentials", fzf=True)
|
|
99
124
|
installation_messages: list[str] = []
|
|
@@ -123,7 +148,7 @@ def install_group(package_group: str):
|
|
|
123
148
|
installers_ = get_installers(os=get_os_name(), arch=get_normalized_arch(), which_cats=[package_group])
|
|
124
149
|
install_bulk(installers_data=installers_)
|
|
125
150
|
else:
|
|
126
|
-
options_system =
|
|
151
|
+
options_system = dynamically_extract_installers_system_groups_from_scripts()
|
|
127
152
|
from machineconfig.utils.schemas.installer.installer_types import get_normalized_arch, get_os_name
|
|
128
153
|
from machineconfig.utils.code import run_shell_script
|
|
129
154
|
for an_item in options_system:
|
|
@@ -122,7 +122,7 @@ machineconfig/scripts/python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
122
122
|
machineconfig/scripts/python/agents.py,sha256=f5UxgXjGlEypoNFqK0uHKO0UkbV_wUmPiPzotL2yapM,10677
|
|
123
123
|
machineconfig/scripts/python/cloud.py,sha256=ubLmf06FSdi1NawpQDgUDAtYb9cZSQqHbSUHzAwRIas,1199
|
|
124
124
|
machineconfig/scripts/python/croshell.py,sha256=0Ym3n-ZmIpaOX_SWnGP88dq_iH7QWJKUZvY0x58sXjI,7083
|
|
125
|
-
machineconfig/scripts/python/devops.py,sha256=
|
|
125
|
+
machineconfig/scripts/python/devops.py,sha256=NS4zbOGm8uRNxmtWuH4vBAajrbZj014FpZrpZTYXS1Y,2159
|
|
126
126
|
machineconfig/scripts/python/devops_navigator.py,sha256=4O9_-ACeP748NcMjWQXZF7mBQpMPxqCGhLvPG3DMi4Q,236
|
|
127
127
|
machineconfig/scripts/python/entry.py,sha256=Az7dK1eXHGW5l46Yg10Cd88VChCdhvLAzO3e1A3r56A,2176
|
|
128
128
|
machineconfig/scripts/python/fire_jobs.py,sha256=O5DrckUGLxGblOcLf_iXU31pmCSpTg-c0hQZxQKD1os,13591
|
|
@@ -384,7 +384,7 @@ machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py,sha256=ogxJnwpdcpH7N6
|
|
|
384
384
|
machineconfig/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
385
385
|
machineconfig/utils/accessories.py,sha256=W_9dLzjwNTW5JQk_pe3B2ijQ1nA2-8Kdg2r7VBtzgQs,4340
|
|
386
386
|
machineconfig/utils/code.py,sha256=f0K5abTIBBurK5pSM_VRtW_npFjK18UvIG_BEyzOv40,8912
|
|
387
|
-
machineconfig/utils/installer.py,sha256=
|
|
387
|
+
machineconfig/utils/installer.py,sha256=puFcMe-oNAeqTW0jz1NAEil8HRtxY4B6Z0VAeq_jH-o,10493
|
|
388
388
|
machineconfig/utils/io.py,sha256=rzEwAnq-gyT29Y4CDHHGxAA6ddIIFOCxrqZ6dn0ALa4,2255
|
|
389
389
|
machineconfig/utils/links.py,sha256=KM6vIn3hag9FYEzLSHP5MAM9tU_RStw2mCq2_OvmmZA,23672
|
|
390
390
|
machineconfig/utils/meta.py,sha256=fDn7cpq6iqAPzX2eKLSK9DZb0870rluR7eLDx5NgNaw,5994
|
|
@@ -413,7 +413,7 @@ machineconfig/utils/files/ouch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
|
413
413
|
machineconfig/utils/files/ouch/decompress.py,sha256=7qPaEkMerBBXzeZyFn8hLODHZJv1aty-yGgwBxLgVys,1413
|
|
414
414
|
machineconfig/utils/installer_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
415
415
|
machineconfig/utils/installer_utils/github_release_bulk.py,sha256=WJf_qZlF02SmIc6C7o1h4Gy4gAaJAfeAS8O9s2Itj-k,6535
|
|
416
|
-
machineconfig/utils/installer_utils/installer.py,sha256=
|
|
416
|
+
machineconfig/utils/installer_utils/installer.py,sha256=aqoAUv2gQoiIrg9ErxLh_kZWyFk3dOL4HEVxXEyAmW4,11178
|
|
417
417
|
machineconfig/utils/installer_utils/installer_abc.py,sha256=ZoMtINHD9cHEu4R5SYUWgHLTAqo4F2a33pBrEOGX4zs,11693
|
|
418
418
|
machineconfig/utils/installer_utils/installer_class.py,sha256=apLMLmpZfHbj4I5ttgwg0ZIp66B5vx2nPtuhEobGdWM,17186
|
|
419
419
|
machineconfig/utils/schemas/fire_agents/fire_agents_input.py,sha256=Xbi59rU35AzR7HZZ8ZQ8aUu_FjSgijNqc8Sme0rCk2Y,2050
|
|
@@ -421,8 +421,8 @@ machineconfig/utils/schemas/installer/installer_types.py,sha256=QClRY61QaduBPJoS
|
|
|
421
421
|
machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
|
|
422
422
|
machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
|
|
423
423
|
machineconfig/utils/ssh_utils/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
424
|
-
machineconfig-
|
|
425
|
-
machineconfig-
|
|
426
|
-
machineconfig-
|
|
427
|
-
machineconfig-
|
|
428
|
-
machineconfig-
|
|
424
|
+
machineconfig-6.1.dist-info/METADATA,sha256=kXGOmMpW4eD3gRmpLwh3No6nfJ_xPOjQsHZHky-bZJU,3011
|
|
425
|
+
machineconfig-6.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
426
|
+
machineconfig-6.1.dist-info/entry_points.txt,sha256=M0jwN_brZdXWhmNVeXLvdKxfkv8WhhXFZYcuKBA9qnk,418
|
|
427
|
+
machineconfig-6.1.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
|
|
428
|
+
machineconfig-6.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|