machineconfig 1.95__py3-none-any.whl → 1.96__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/cluster/cloud_manager.py +445 -343
- machineconfig/cluster/data_transfer.py +63 -57
- machineconfig/cluster/distribute.py +284 -280
- machineconfig/cluster/file_manager.py +234 -237
- machineconfig/cluster/job_params.py +133 -133
- machineconfig/cluster/loader_runner.py +183 -149
- machineconfig/cluster/remote_machine.py +269 -252
- machineconfig/cluster/script_execution.py +215 -209
- machineconfig/cluster/script_notify_upon_completion.py +50 -43
- machineconfig/cluster/self_ssh.py +52 -54
- machineconfig/cluster/sessions_managers/__init__.py +0 -0
- machineconfig/cluster/sessions_managers/archive/__init__.py +0 -0
- machineconfig/{jobs/python → cluster/sessions_managers/archive}/create_zellij_template.py +5 -3
- machineconfig/cluster/sessions_managers/archive/session_managers.py +184 -0
- machineconfig/cluster/sessions_managers/demo_rich_zellij.py +0 -0
- machineconfig/cluster/sessions_managers/enhanced_command_runner.py +160 -0
- machineconfig/cluster/sessions_managers/wt_local.py +494 -0
- machineconfig/cluster/sessions_managers/wt_local_manager.py +577 -0
- machineconfig/cluster/sessions_managers/wt_remote.py +288 -0
- machineconfig/cluster/sessions_managers/wt_remote_manager.py +483 -0
- machineconfig/cluster/sessions_managers/wt_utils/layout_generator.py +196 -0
- machineconfig/cluster/sessions_managers/wt_utils/process_monitor.py +418 -0
- machineconfig/cluster/sessions_managers/wt_utils/remote_executor.py +175 -0
- machineconfig/cluster/sessions_managers/wt_utils/session_manager.py +300 -0
- machineconfig/cluster/sessions_managers/wt_utils/status_reporter.py +228 -0
- machineconfig/cluster/sessions_managers/zellij_local.py +418 -0
- machineconfig/cluster/sessions_managers/zellij_local_manager.py +533 -0
- machineconfig/cluster/sessions_managers/zellij_remote.py +229 -0
- machineconfig/cluster/sessions_managers/zellij_remote_manager.py +188 -0
- machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py +64 -0
- machineconfig/cluster/sessions_managers/zellij_utils/layout_generator.py +126 -0
- machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py +334 -0
- machineconfig/cluster/sessions_managers/zellij_utils/remote_executor.py +68 -0
- machineconfig/cluster/sessions_managers/zellij_utils/session_manager.py +119 -0
- machineconfig/cluster/sessions_managers/zellij_utils/status_reporter.py +85 -0
- machineconfig/cluster/templates/cli_click.py +0 -1
- machineconfig/cluster/templates/cli_gooey.py +102 -104
- machineconfig/cluster/templates/run_cloud.py +51 -51
- machineconfig/cluster/templates/run_cluster.py +103 -59
- machineconfig/cluster/templates/run_remote.py +57 -58
- machineconfig/cluster/templates/utils.py +69 -36
- machineconfig/jobs/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python/check_installations.py +258 -190
- machineconfig/jobs/python/create_bootable_media.py +7 -3
- machineconfig/jobs/python/python_cargo_build_share.py +50 -50
- machineconfig/jobs/python/python_ve_symlink.py +6 -6
- machineconfig/jobs/python/vscode/__pycache__/select_interpreter.cpython-311.pyc +0 -0
- machineconfig/jobs/python/vscode/api.py +1 -1
- machineconfig/jobs/python/vscode/link_ve.py +2 -2
- machineconfig/jobs/python/vscode/select_interpreter.py +9 -5
- machineconfig/jobs/python/vscode/sync_code.py +8 -5
- machineconfig/jobs/python_custom_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_custom_installers/archive/ngrok.py +1 -1
- machineconfig/jobs/python_custom_installers/dev/alacritty.py +3 -2
- machineconfig/jobs/python_custom_installers/dev/brave.py +7 -3
- machineconfig/jobs/python_custom_installers/dev/bypass_paywall.py +3 -4
- machineconfig/jobs/python_custom_installers/dev/code.py +3 -1
- machineconfig/jobs/python_custom_installers/dev/cursor.py +66 -5
- machineconfig/jobs/python_custom_installers/dev/docker_desktop.py +0 -1
- machineconfig/jobs/python_custom_installers/dev/espanso.py +13 -9
- machineconfig/jobs/python_custom_installers/dev/goes.py +2 -8
- machineconfig/jobs/python_custom_installers/dev/lvim.py +3 -2
- machineconfig/jobs/python_custom_installers/dev/nerdfont.py +1 -1
- machineconfig/jobs/python_custom_installers/dev/redis.py +7 -3
- machineconfig/jobs/python_custom_installers/dev/wezterm.py +8 -4
- machineconfig/jobs/python_custom_installers/dev/winget.py +194 -0
- machineconfig/jobs/python_custom_installers/{dev/docker.py → docker.py} +8 -3
- machineconfig/jobs/python_custom_installers/gh.py +4 -3
- machineconfig/jobs/python_custom_installers/hx.py +9 -8
- machineconfig/jobs/python_custom_installers/scripts/linux/vscode.sh +97 -30
- machineconfig/jobs/python_custom_installers/{dev/warp-cli.py → warp-cli.py} +1 -1
- machineconfig/jobs/python_generic_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_generic_installers/config.json +133 -9
- machineconfig/jobs/python_generic_installers/dev/config.json +208 -37
- machineconfig/jobs/python_generic_installers/update.py +3 -0
- machineconfig/jobs/python_linux_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_linux_installers/config.json +42 -6
- machineconfig/jobs/python_linux_installers/dev/config.json +79 -11
- machineconfig/jobs/python_windows_installers/config.json +6 -0
- machineconfig/profile/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/create.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/shell.cpython-311.pyc +0 -0
- machineconfig/profile/create.py +5 -5
- machineconfig/profile/create_hardlinks.py +5 -5
- machineconfig/profile/shell.py +44 -17
- machineconfig/scripts/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/linux/fire_agents +27 -0
- machineconfig/scripts/linux/wifi_conn +24 -0
- machineconfig/scripts/python/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_copy.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_mount.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_sync.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/croshell.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_backup_retrieve.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_devapps_install.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_update_repos.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_agents.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_jobs.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_jobs.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/get_zellij_cmd.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/repos.cpython-311.pyc +0 -0
- machineconfig/scripts/python/archive/im2text.py +1 -3
- machineconfig/scripts/python/choose_wezterm_theme.py +3 -3
- machineconfig/scripts/python/cloud_copy.py +10 -10
- machineconfig/scripts/python/cloud_manager.py +77 -99
- machineconfig/scripts/python/cloud_mount.py +13 -12
- machineconfig/scripts/python/cloud_repo_sync.py +14 -11
- machineconfig/scripts/python/croshell.py +24 -21
- machineconfig/scripts/python/devops.py +12 -17
- machineconfig/scripts/python/devops_add_identity.py +32 -10
- machineconfig/scripts/python/devops_add_ssh_key.py +10 -10
- machineconfig/scripts/python/devops_backup_retrieve.py +9 -8
- machineconfig/scripts/python/devops_devapps_install.py +6 -6
- machineconfig/scripts/python/devops_update_repos.py +4 -3
- machineconfig/scripts/python/dotfile.py +10 -7
- machineconfig/scripts/python/fire_agents.py +69 -0
- machineconfig/scripts/python/fire_jobs.py +56 -65
- machineconfig/scripts/python/ftpx.py +8 -8
- machineconfig/scripts/python/get_zellij_cmd.py +3 -3
- machineconfig/scripts/python/gh_models.py +6 -4
- machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/cloud_helpers.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers2.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers4.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers4.cpython-313.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/repo_sync_helpers.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/cloud_helpers.py +12 -12
- machineconfig/scripts/python/helpers/helpers2.py +9 -8
- machineconfig/scripts/python/helpers/helpers4.py +23 -35
- machineconfig/scripts/python/helpers/repo_sync_helpers.py +17 -16
- machineconfig/scripts/python/mount_nfs.py +8 -11
- machineconfig/scripts/python/mount_nw_drive.py +4 -4
- machineconfig/scripts/python/mount_ssh.py +2 -2
- machineconfig/scripts/python/onetimeshare.py +56 -57
- machineconfig/scripts/python/pomodoro.py +55 -55
- machineconfig/scripts/python/repos.py +26 -18
- machineconfig/scripts/python/scheduler.py +70 -53
- machineconfig/scripts/python/snapshot.py +21 -24
- machineconfig/scripts/python/start_slidev.py +6 -5
- machineconfig/scripts/python/start_terminals.py +3 -1
- machineconfig/scripts/python/viewer.py +5 -4
- machineconfig/scripts/python/viewer_template.py +138 -140
- machineconfig/scripts/python/wifi_conn.py +412 -60
- machineconfig/scripts/python/wsl_windows_transfer.py +18 -3
- machineconfig/settings/linters/.pylintrc +6 -7
- machineconfig/settings/lvim/windows/config.lua +0 -0
- machineconfig/settings/shells/bash/init.sh +6 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/playext.py +7 -6
- machineconfig/settings/shells/pwsh/init.ps1 +6 -6
- machineconfig/settings/shells/wt/settings.json +51 -266
- machineconfig/setup_linux/web_shortcuts/interactive.sh +5 -2
- machineconfig/setup_windows/wt_and_pwsh/set_pwsh_theme.py +3 -6
- machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +11 -9
- machineconfig/utils/ai/url2md.py +2 -2
- machineconfig/utils/cloud/onedrive/setup_oauth.py +59 -0
- machineconfig/utils/cloud/onedrive/transaction.py +796 -0
- machineconfig/utils/code.py +22 -13
- machineconfig/utils/installer.py +78 -35
- machineconfig/utils/installer_utils/installer_abc.py +7 -6
- machineconfig/utils/installer_utils/installer_class.py +44 -25
- machineconfig/utils/io_save.py +107 -0
- machineconfig/utils/links.py +19 -15
- machineconfig/utils/options.py +4 -8
- machineconfig/utils/path.py +91 -78
- machineconfig/utils/path_reduced.py +608 -0
- machineconfig/utils/procs.py +110 -45
- machineconfig/utils/scheduling.py +312 -222
- machineconfig/utils/utils.py +7 -7
- machineconfig/utils/utils2.py +42 -0
- machineconfig/utils/utils5.py +84 -0
- machineconfig/utils/ve.py +49 -87
- {machineconfig-1.95.dist-info → machineconfig-1.96.dist-info}/METADATA +2 -2
- machineconfig-1.96.dist-info/RECORD +437 -0
- machineconfig/cluster/session_managers.py +0 -183
- machineconfig/cluster/templates/f.py +0 -4
- machineconfig/jobs/python/__pycache__/check_installations.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/checkout_version.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/python_ve_symlink.cpython-311.pyc +0 -0
- machineconfig/jobs/python/checkout_version.py +0 -123
- machineconfig/jobs/python/vscode/__pycache__/api.cpython-311.pyc +0 -0
- machineconfig/jobs/python/vscode/__pycache__/link_ve.cpython-311.pyc +0 -0
- machineconfig/jobs/python_custom_installers/__pycache__/hx.cpython-311.pyc +0 -0
- machineconfig/jobs/python_windows_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/.mypy_cache/.gitignore +0 -2
- machineconfig/scripts/python/.mypy_cache/3.11/@plugins_snapshot.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/__future__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/__future__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_ast.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_ast.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_bz2.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_bz2.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_codecs.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_codecs.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_collections_abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_collections_abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_compression.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_compression.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_decimal.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_decimal.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib_external.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib_external.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_io.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_io.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_locale.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_locale.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_stat.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_stat.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_struct.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_struct.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_thread.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_thread.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/importlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/importlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_warnings.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_warnings.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_weakref.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_weakref.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_weakrefset.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_weakrefset.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/argparse.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/argparse.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/ast.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/ast.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/binascii.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/binascii.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/builtins.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/builtins.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/bz2.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/bz2.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/calendar.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/calendar.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/codecs.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/codecs.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/collections/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/collections/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/collections/abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/collections/abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/configparser.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/configparser.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/contextlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/contextlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/dataclasses.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/dataclasses.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/datetime.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/datetime.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/decimal.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/decimal.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/dis.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/dis.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/_policybase.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/_policybase.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/charset.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/charset.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/contentmanager.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/contentmanager.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/errors.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/errors.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/header.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/header.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/message.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/message.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/policy.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/policy.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/enum.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/enum.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/fnmatch.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/fnmatch.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/functools.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/functools.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/gc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/gc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/genericpath.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/genericpath.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/getpass.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/getpass.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/cmd.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/cmd.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/compat.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/compat.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/config.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/config.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/db.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/db.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/diff.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/diff.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/exc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/exc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/base.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/base.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/fun.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/fun.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/typ.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/typ.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/util.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/util.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/base.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/base.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/blob.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/blob.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/commit.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/commit.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/fun.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/fun.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/base.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/base.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/root.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/root.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/util.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/util.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tag.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tag.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tree.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tree.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/util.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/util.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/head.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/head.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/log.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/log.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/reference.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/reference.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/remote.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/remote.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/symbolic.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/symbolic.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/tag.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/tag.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/remote.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/remote.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/base.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/base.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/fun.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/fun.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/types.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/types.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/util.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/util.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/glob.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/glob.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/gzip.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/gzip.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap_external.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap_external.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/machinery.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/machinery.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/_meta.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/_meta.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/readers.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/readers.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/_common.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/_common.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/inspect.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/inspect.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/io.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/io.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/itertools.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/itertools.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/locale.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/locale.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/logging/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/logging/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/mimetypes.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/mimetypes.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/mmap.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/mmap.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/numbers.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/numbers.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/opcode.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/opcode.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/os/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/os/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/os/path.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/os/path.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/pathlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/pathlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/platform.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/platform.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/posixpath.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/posixpath.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/re.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/re.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/resource.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/resource.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/shlex.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/shlex.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/shutil.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/shutil.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/signal.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/signal.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/python/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/python/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_compile.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_compile.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_constants.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_constants.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_parse.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_parse.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/stat.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/stat.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/string.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/string.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/struct.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/struct.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/subprocess.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/subprocess.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sys/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sys/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/tarfile.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/tarfile.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/tempfile.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/tempfile.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/textwrap.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/textwrap.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/threading.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/threading.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/time.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/time.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/types.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/types.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/typing.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/typing.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/typing_extensions.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/typing_extensions.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/parse.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/parse.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/uuid.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/uuid.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/warnings.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/warnings.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/weakref.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/weakref.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/zipfile/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/zipfile/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/zlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/zlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/CACHEDIR.TAG +0 -3
- machineconfig/scripts/python/__pycache__/cloud_repo_sync.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/gh_models.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/url2md.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/viewer.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/vscode_api.cpython-311.pyc +0 -0
- machineconfig/settings/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/settings/linters/.ruff_cache/.gitignore +0 -2
- machineconfig/settings/linters/.ruff_cache/CACHEDIR.TAG +0 -1
- machineconfig/settings/shells/ipy/profiles/default/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/__pycache__/playext.cpython-311.pyc +0 -0
- machineconfig/utils/ve_utils/ve1.py +0 -111
- machineconfig/utils/ve_utils/ve2.py +0 -155
- machineconfig-1.95.dist-info/RECORD +0 -712
- {machineconfig-1.95.dist-info → machineconfig-1.96.dist-info}/WHEEL +0 -0
- {machineconfig-1.95.dist-info → machineconfig-1.96.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import requests
|
|
3
|
+
import tempfile
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
config_dict = {
|
|
9
|
+
"repo_url": "CUSTOM",
|
|
10
|
+
"doc": "winget installer",
|
|
11
|
+
"filename_template_windows_amd_64": "",
|
|
12
|
+
"filename_template_linux_amd_64": "",
|
|
13
|
+
"strip_v": False,
|
|
14
|
+
"exe_name": "winget"
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def is_winget_available() -> bool:
|
|
19
|
+
"""
|
|
20
|
+
Check if winget is available in the system PATH.
|
|
21
|
+
|
|
22
|
+
Returns:
|
|
23
|
+
bool: True if winget is available, False otherwise
|
|
24
|
+
"""
|
|
25
|
+
try:
|
|
26
|
+
result = subprocess.run(
|
|
27
|
+
["winget", "--version"],
|
|
28
|
+
capture_output=True,
|
|
29
|
+
text=True,
|
|
30
|
+
timeout=10
|
|
31
|
+
)
|
|
32
|
+
return result.returncode == 0
|
|
33
|
+
except (subprocess.TimeoutExpired, FileNotFoundError, subprocess.SubprocessError):
|
|
34
|
+
return False
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def get_latest_winget_release_url() -> Optional[str]:
|
|
38
|
+
"""
|
|
39
|
+
Get the download URL for the latest winget .msixbundle file from GitHub releases.
|
|
40
|
+
|
|
41
|
+
Returns:
|
|
42
|
+
Optional[str]: URL to the latest .msixbundle file, or None if not found
|
|
43
|
+
"""
|
|
44
|
+
try:
|
|
45
|
+
# Get the latest release information from GitHub API
|
|
46
|
+
api_url = "https://api.github.com/repos/microsoft/winget-cli/releases/latest"
|
|
47
|
+
headers = {"Accept": "application/vnd.github.v3+json"}
|
|
48
|
+
|
|
49
|
+
response = requests.get(api_url, headers=headers, timeout=30)
|
|
50
|
+
response.raise_for_status()
|
|
51
|
+
|
|
52
|
+
release_data = response.json()
|
|
53
|
+
|
|
54
|
+
# Look for .msixbundle file in assets
|
|
55
|
+
for asset in release_data.get("assets", []):
|
|
56
|
+
if asset["name"].endswith(".msixbundle"):
|
|
57
|
+
return asset["browser_download_url"]
|
|
58
|
+
|
|
59
|
+
return None
|
|
60
|
+
except (requests.RequestException, KeyError, ValueError) as e:
|
|
61
|
+
print(f"Error fetching latest winget release: {e}")
|
|
62
|
+
return None
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def download_file(url: str, destination: Path) -> bool:
|
|
66
|
+
"""
|
|
67
|
+
Download a file from URL to destination.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
url: URL to download from
|
|
71
|
+
destination: Path where to save the file
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
bool: True if download successful, False otherwise
|
|
75
|
+
"""
|
|
76
|
+
try:
|
|
77
|
+
response = requests.get(url, stream=True, timeout=60)
|
|
78
|
+
response.raise_for_status()
|
|
79
|
+
|
|
80
|
+
with open(destination, 'wb') as f:
|
|
81
|
+
for chunk in response.iter_content(chunk_size=8192):
|
|
82
|
+
if chunk:
|
|
83
|
+
f.write(chunk)
|
|
84
|
+
|
|
85
|
+
return True
|
|
86
|
+
except (requests.RequestException, IOError) as e:
|
|
87
|
+
print(f"Error downloading file: {e}")
|
|
88
|
+
return False
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def install_msix_package(package_path: Path) -> bool:
|
|
92
|
+
"""
|
|
93
|
+
Install an MSIX package using PowerShell.
|
|
94
|
+
|
|
95
|
+
Args:
|
|
96
|
+
package_path: Path to the .msixbundle file
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
bool: True if installation successful, False otherwise
|
|
100
|
+
"""
|
|
101
|
+
try:
|
|
102
|
+
# Use PowerShell to install the MSIX package
|
|
103
|
+
powershell_cmd = [
|
|
104
|
+
"powershell.exe",
|
|
105
|
+
"-ExecutionPolicy", "Bypass",
|
|
106
|
+
"-Command",
|
|
107
|
+
f"Add-AppxPackage -Path '{package_path}'"
|
|
108
|
+
]
|
|
109
|
+
|
|
110
|
+
result = subprocess.run(
|
|
111
|
+
powershell_cmd,
|
|
112
|
+
capture_output=True,
|
|
113
|
+
text=True,
|
|
114
|
+
timeout=300 # 5 minutes timeout
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
if result.returncode == 0:
|
|
118
|
+
print("Winget installed successfully!")
|
|
119
|
+
return True
|
|
120
|
+
else:
|
|
121
|
+
print(f"Installation failed with return code {result.returncode}")
|
|
122
|
+
print(f"Error output: {result.stderr}")
|
|
123
|
+
return False
|
|
124
|
+
|
|
125
|
+
except (subprocess.SubprocessError, subprocess.TimeoutExpired) as e:
|
|
126
|
+
print(f"Error installing MSIX package: {e}")
|
|
127
|
+
return False
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def ensure_winget_available() -> bool:
|
|
131
|
+
"""
|
|
132
|
+
Ensure winget is available on the system. If not available, download and install it.
|
|
133
|
+
|
|
134
|
+
Returns:
|
|
135
|
+
bool: True if winget is available (either was already installed or successfully installed),
|
|
136
|
+
False if installation failed
|
|
137
|
+
"""
|
|
138
|
+
# First check if winget is already available
|
|
139
|
+
if is_winget_available():
|
|
140
|
+
print("Winget is already available on the system.")
|
|
141
|
+
return True
|
|
142
|
+
|
|
143
|
+
print("Winget not found. Attempting to download and install...")
|
|
144
|
+
|
|
145
|
+
# Get the latest release URL
|
|
146
|
+
download_url = get_latest_winget_release_url()
|
|
147
|
+
if not download_url:
|
|
148
|
+
print("Could not find the latest winget release URL.")
|
|
149
|
+
return False
|
|
150
|
+
|
|
151
|
+
print(f"Found latest winget release: {download_url}")
|
|
152
|
+
|
|
153
|
+
# Create temporary directory for download
|
|
154
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
155
|
+
temp_path = Path(temp_dir)
|
|
156
|
+
|
|
157
|
+
# Extract filename from URL
|
|
158
|
+
filename = download_url.split("/")[-1]
|
|
159
|
+
if not filename.endswith(".msixbundle"):
|
|
160
|
+
filename = "winget-latest.msixbundle"
|
|
161
|
+
|
|
162
|
+
package_path = temp_path / filename
|
|
163
|
+
|
|
164
|
+
# Download the package
|
|
165
|
+
print(f"Downloading winget package to {package_path}...")
|
|
166
|
+
if not download_file(download_url, package_path):
|
|
167
|
+
print("Failed to download winget package.")
|
|
168
|
+
return False
|
|
169
|
+
|
|
170
|
+
print("Download completed. Installing winget...")
|
|
171
|
+
|
|
172
|
+
# Install the package
|
|
173
|
+
if not install_msix_package(package_path):
|
|
174
|
+
print("Failed to install winget package.")
|
|
175
|
+
return False
|
|
176
|
+
|
|
177
|
+
# Verify installation
|
|
178
|
+
if is_winget_available():
|
|
179
|
+
print("Winget has been successfully installed and is now available!")
|
|
180
|
+
return True
|
|
181
|
+
else:
|
|
182
|
+
print("Installation completed but winget is still not available. You may need to restart your terminal or add it to PATH.")
|
|
183
|
+
return False
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
if __name__ == "__main__":
|
|
187
|
+
# Example usage
|
|
188
|
+
print("=== Winget Installation ===\n")
|
|
189
|
+
|
|
190
|
+
if ensure_winget_available():
|
|
191
|
+
print("Winget is ready to use!")
|
|
192
|
+
else:
|
|
193
|
+
print("Failed to ensure winget availability.")
|
|
194
|
+
|
|
@@ -35,11 +35,16 @@ def main(version: Optional[str]):
|
|
|
35
35
|
{'⚠️' * 20}
|
|
36
36
|
""")
|
|
37
37
|
raise NotImplementedError(error_msg)
|
|
38
|
-
elif platform.system()
|
|
39
|
-
|
|
38
|
+
elif platform.system() in ["Linux", "Darwin"]:
|
|
39
|
+
system_name = "Linux" if platform.system() == "Linux" else "macOS"
|
|
40
|
+
print(f"🐧 Installing Docker on {system_name} using official script...")
|
|
40
41
|
import machineconfig.jobs.python_custom_installers as module
|
|
41
42
|
from pathlib import Path
|
|
42
|
-
|
|
43
|
+
if platform.system() == "Linux":
|
|
44
|
+
program = Path(module.__file__).parent.joinpath("scripts/linux/docker.sh").read_text(encoding="utf-8")
|
|
45
|
+
else: # Darwin/macOS
|
|
46
|
+
# For macOS, we'll use the same script or recommend Homebrew
|
|
47
|
+
program = "brew install --cask docker"
|
|
43
48
|
else:
|
|
44
49
|
error_msg = f"Unsupported platform: {platform.system()}"
|
|
45
50
|
print(f"""
|
|
@@ -55,9 +55,10 @@ def main(version: Optional[str]):
|
|
|
55
55
|
🪟 WINDOWS SETUP | Configuring GitHub CLI for Windows...
|
|
56
56
|
""")
|
|
57
57
|
program = "gh extension install github/gh-copilot"
|
|
58
|
-
elif platform.system()
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
elif platform.system() in ["Linux", "Darwin"]:
|
|
59
|
+
system_name = "LINUX" if platform.system() == "Linux" else "MACOS"
|
|
60
|
+
print(f"""
|
|
61
|
+
🐧 {system_name} SETUP | Configuring GitHub CLI for {platform.system()}...
|
|
61
62
|
""")
|
|
62
63
|
program = """
|
|
63
64
|
gh extension install github/gh-copilot
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Installers do not add runtime files to the machine, hence this script.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
from
|
|
5
|
+
from machineconfig.utils.path_reduced import P as PathExtended
|
|
6
6
|
from machineconfig.utils.installer_utils.installer_abc import WINDOWS_INSTALL_PATH
|
|
7
7
|
from typing import Optional
|
|
8
8
|
import platform
|
|
@@ -61,30 +61,31 @@ def main(version: Optional[str], install_lib: bool = False):
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
print("\n🗑️ [Step 3/5] Cleaning up previous installation (if any)...")
|
|
64
|
-
runtime_path =
|
|
65
|
-
contrib_path =
|
|
64
|
+
runtime_path = PathExtended.home().joinpath(".config/helix/runtime")
|
|
65
|
+
contrib_path = PathExtended.home().joinpath(".config/helix/contrib")
|
|
66
66
|
runtime_path.delete(sure=True, verbose=False)
|
|
67
67
|
contrib_path.delete(sure=True, verbose=False)
|
|
68
68
|
print(f" ✨ Cleaned '{runtime_path}' and '{contrib_path}'.")
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
print("\n📦 [Step 4/5] Installing Helix components...")
|
|
72
|
-
target_config_dir =
|
|
72
|
+
target_config_dir = PathExtended("~/.config/helix").expanduser()
|
|
73
73
|
target_config_dir.mkdir(parents=True, exist_ok=True)
|
|
74
74
|
|
|
75
|
-
if platform.system()
|
|
76
|
-
target_bin_path = LINUX_INSTALL_PATH
|
|
75
|
+
if platform.system() in ["Linux", "Darwin"]:
|
|
76
|
+
target_bin_path = PathExtended(LINUX_INSTALL_PATH) if platform.system() == "Linux" else PathExtended("/usr/local/bin")
|
|
77
77
|
exe_name = "hx"
|
|
78
78
|
hx_file.move(folder=target_bin_path, overwrite=True)
|
|
79
79
|
if install_lib:
|
|
80
80
|
contrib.move(folder=target_config_dir, overwrite=True)
|
|
81
81
|
runtime.move(folder=target_config_dir, overwrite=True)
|
|
82
|
-
|
|
82
|
+
system_name = "Linux" if platform.system() == "Linux" else "macOS"
|
|
83
|
+
console.print(Panel(f"""✅ SUCCESS | Helix editor installed successfully on {system_name}!
|
|
83
84
|
|
|
84
85
|
📂 Executable: {target_bin_path / exe_name}
|
|
85
86
|
🔧 Config: {target_config_dir}""", title="Success", expand=False))
|
|
86
87
|
elif platform.system() == "Windows":
|
|
87
|
-
target_bin_path = WINDOWS_INSTALL_PATH
|
|
88
|
+
target_bin_path = PathExtended(WINDOWS_INSTALL_PATH)
|
|
88
89
|
exe_name = "hx.exe"
|
|
89
90
|
hx_file.move(folder=target_bin_path, overwrite=True)
|
|
90
91
|
if install_lib:
|
|
@@ -5,46 +5,105 @@
|
|
|
5
5
|
# This script installs Visual Studio Code on Ubuntu/Debian-based Linux distributions
|
|
6
6
|
# Reference: https://code.visualstudio.com/docs/setup/linux
|
|
7
7
|
|
|
8
|
-
#
|
|
9
|
-
|
|
8
|
+
# Function to handle errors
|
|
9
|
+
handle_error() {
|
|
10
|
+
echo "❌ Error occurred during installation. Cleaning up..."
|
|
11
|
+
sudo rm -f /tmp/packages.microsoft.gpg
|
|
12
|
+
sudo rm -f /tmp/code.deb
|
|
13
|
+
exit 1
|
|
14
|
+
}
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
echo """#=======================================================================
|
|
14
|
-
|
|
16
|
+
# Function to install via direct .deb download (fallback method)
|
|
17
|
+
install_vscode_direct() {
|
|
18
|
+
echo """#=======================================================================
|
|
19
|
+
📦 FALLBACK INSTALLATION | Installing VS Code via direct download
|
|
15
20
|
#=======================================================================
|
|
16
21
|
"""
|
|
22
|
+
|
|
23
|
+
echo "⬇️ Downloading VS Code .deb package..."
|
|
24
|
+
wget -O /tmp/code.deb "https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64"
|
|
25
|
+
|
|
26
|
+
echo "📦 Installing VS Code from .deb package..."
|
|
27
|
+
sudo dpkg -i /tmp/code.deb
|
|
28
|
+
|
|
29
|
+
# Fix any dependency issues
|
|
30
|
+
sudo apt-get install -f -y
|
|
31
|
+
|
|
32
|
+
# Cleanup
|
|
33
|
+
rm -f /tmp/code.deb
|
|
34
|
+
|
|
35
|
+
echo "✅ VS Code installed via direct download method"
|
|
36
|
+
}
|
|
17
37
|
|
|
18
|
-
# Check if GPG key is already installed
|
|
19
|
-
if [ ! -f /etc/apt/keyrings/packages.microsoft.gpg ]; then
|
|
20
|
-
echo "🔐 Downloading and installing Microsoft GPG key..."
|
|
21
|
-
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
|
|
22
|
-
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
|
|
23
|
-
rm -f packages.microsoft.gpg
|
|
24
|
-
else
|
|
25
|
-
echo "✅ Microsoft GPG key already installed"
|
|
26
|
-
fi
|
|
27
38
|
|
|
28
|
-
# Check if VS Code repository is already added
|
|
29
|
-
if [ ! -f /etc/apt/sources.list.d/vscode.list ]; then
|
|
30
|
-
echo "📝 Adding VS Code repository to sources list..."
|
|
31
|
-
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null
|
|
32
|
-
else
|
|
33
|
-
echo "✅ VS Code repository already configured"
|
|
34
|
-
fi
|
|
35
39
|
|
|
36
40
|
echo """#=======================================================================
|
|
37
|
-
|
|
41
|
+
� INSTALLING VS CODE | Using direct download method
|
|
38
42
|
#=======================================================================
|
|
39
43
|
"""
|
|
40
44
|
|
|
41
|
-
#
|
|
42
|
-
echo "
|
|
43
|
-
|
|
45
|
+
# Try direct download method first (more reliable)
|
|
46
|
+
echo "📥 Installing Visual Studio Code via direct download..."
|
|
47
|
+
install_vscode_direct
|
|
44
48
|
|
|
45
|
-
#
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
# If direct download failed, try repository method
|
|
50
|
+
if ! command -v code >/dev/null 2>&1; then
|
|
51
|
+
echo "⚠️ Direct download failed, trying repository method..."
|
|
52
|
+
|
|
53
|
+
echo """#=======================================================================
|
|
54
|
+
🔑 SETTING UP MICROSOFT REPOSITORY | Fallback method
|
|
55
|
+
#=======================================================================
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
# Clean up any existing conflicting configurations
|
|
59
|
+
echo "🧹 Cleaning up existing Microsoft repository configurations..."
|
|
60
|
+
|
|
61
|
+
# More thorough cleanup - remove all possible Microsoft configurations
|
|
62
|
+
sudo rm -f /etc/apt/sources.list.d/vscode.list*
|
|
63
|
+
sudo rm -f /etc/apt/sources.list.d/code.list*
|
|
64
|
+
sudo rm -f /etc/apt/sources.list.d/microsoft*.list*
|
|
65
|
+
sudo rm -f /etc/apt/sources.list.d/*.microsoft.*
|
|
66
|
+
sudo rm -f /etc/apt/keyrings/packages.microsoft.gpg*
|
|
67
|
+
sudo rm -f /etc/apt/keyrings/microsoft.gpg*
|
|
68
|
+
sudo rm -f /usr/share/keyrings/microsoft.gpg*
|
|
69
|
+
sudo rm -f /usr/share/keyrings/packages.microsoft.gpg*
|
|
70
|
+
|
|
71
|
+
# Remove any Microsoft entries from main sources.list and backup files
|
|
72
|
+
sudo sed -i '/packages\.microsoft\.com/d' /etc/apt/sources.list*
|
|
73
|
+
|
|
74
|
+
# Clean APT cache to ensure fresh start
|
|
75
|
+
sudo apt clean
|
|
76
|
+
sudo rm -rf /var/lib/apt/lists/*
|
|
77
|
+
|
|
78
|
+
echo "🔄 Updating APT package lists to clear any cached conflicts..."
|
|
79
|
+
sudo apt update
|
|
80
|
+
|
|
81
|
+
echo "🔐 Downloading and installing Microsoft GPG key..."
|
|
82
|
+
# Create keyrings directory if it doesn't exist
|
|
83
|
+
sudo mkdir -p /etc/apt/keyrings
|
|
84
|
+
|
|
85
|
+
# Download and install the GPG key
|
|
86
|
+
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/packages.microsoft.gpg
|
|
87
|
+
sudo install -D -o root -g root -m 644 /tmp/packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
|
|
88
|
+
sudo chmod 644 /etc/apt/keyrings/packages.microsoft.gpg
|
|
89
|
+
rm -f /tmp/packages.microsoft.gpg
|
|
90
|
+
|
|
91
|
+
echo "📝 Adding VS Code repository to sources list..."
|
|
92
|
+
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null
|
|
93
|
+
|
|
94
|
+
# Verify the repository was added correctly
|
|
95
|
+
echo "🔍 Verifying repository configuration..."
|
|
96
|
+
cat /etc/apt/sources.list.d/vscode.list
|
|
97
|
+
|
|
98
|
+
# Update package lists specifically for the new repository
|
|
99
|
+
echo "🔄 Updating package lists for VS Code repository..."
|
|
100
|
+
if sudo apt update; then
|
|
101
|
+
echo "📥 Installing Visual Studio Code from repository..."
|
|
102
|
+
sudo nala install code -y
|
|
103
|
+
else
|
|
104
|
+
echo "❌ Repository method also failed. VS Code may not be installed."
|
|
105
|
+
fi
|
|
106
|
+
fi
|
|
48
107
|
|
|
49
108
|
echo """#=======================================================================
|
|
50
109
|
🔄 CHECKING FOR VS CODE INSIDERS | Updating if installed
|
|
@@ -63,5 +122,13 @@ echo """#=======================================================================
|
|
|
63
122
|
✅ INSTALLATION COMPLETE | VS Code has been installed successfully
|
|
64
123
|
#=======================================================================
|
|
65
124
|
"""
|
|
66
|
-
|
|
125
|
+
|
|
126
|
+
# Verify installation
|
|
127
|
+
if command -v code >/dev/null 2>&1; then
|
|
128
|
+
echo "🚀 VS Code installed successfully! Version: $(code --version | head -1)"
|
|
129
|
+
echo "💡 You can launch VS Code from your applications menu or by typing 'code' in terminal"
|
|
130
|
+
else
|
|
131
|
+
echo "⚠️ VS Code installation may have failed. Trying fallback method..."
|
|
132
|
+
install_vscode_direct
|
|
133
|
+
fi
|
|
67
134
|
|
|
@@ -34,7 +34,7 @@ def main(version: Optional[str]):
|
|
|
34
34
|
{'⚠️' * 20}
|
|
35
35
|
""")
|
|
36
36
|
raise NotImplementedError(error_msg)
|
|
37
|
-
elif platform.system()
|
|
37
|
+
elif platform.system() in ["Linux", "Darwin"]:
|
|
38
38
|
print("""
|
|
39
39
|
🐧 LINUX SETUP | Installing Cloudflare WARP CLI using installation script...
|
|
40
40
|
""")
|