diff --git a/mxpy-up.py b/mxpy-up.py index 8cfacc3e..24177d3a 100644 --- a/mxpy-up.py +++ b/mxpy-up.py @@ -21,9 +21,15 @@ def main(): parser.add_argument("--from-branch", help="use a branch of multiversx/mx-sdk-py-cli") parser.add_argument("--not-interactive", action="store_true", default=False) parser.add_argument("--verbose", action="store_true", default=False) + parser.add_argument("--ignore-deprecation", action="store_true", default=False, help="'mxpy-up.py' is obsolete, install using 'pipx': https://docs.multiversx.com/sdk-and-tools/sdk-py/installing-mxpy/#install-using-pipx") parser.set_defaults(modify_path=True) args = parser.parse_args() + logger.warning("'mxpy-up.py' is deprecated. Check out the documentation on how to install using `pipx`: https://docs.multiversx.com/sdk-and-tools/sdk-py/installing-mxpy/#install-using-pipx.") + + if not args.ignore_deprecation: + raise Exception("'mxpy-up.py' is deprecated, please install using `pipx`: https://docs.multiversx.com/sdk-and-tools/sdk-py/installing-mxpy/#install-using-pipx. If installing using 'mxpy-up` is necessary, provide the `--ignore-deprecation` flag.") + exact_version = args.exact_version from_branch = args.from_branch interactive = not args.not_interactive @@ -56,6 +62,8 @@ def main(): if interactive: guide_system_path_integration() + logger.warning("Installing `mxpy` using `mxpy-up.py` is deprecated. Check out the documentation on how to install using `pipx`: https://docs.multiversx.com/sdk-and-tools/sdk-py/installing-mxpy/#install-using-pipx") + def guard_non_root_user(): logger.debug("Checking user (should not be root).") @@ -260,7 +268,7 @@ def guide_system_path_integration(): return old_export_directive = f'export PATH="{Path("~/elrondsdk").expanduser()}:$PATH"\t# elrond-sdk' - new_export_directive = f'export PATH="${{HOME}}/multiversx-sdk:$PATH"\t# multiversx-sdk' + new_export_directive = 'export PATH="${{HOME}}/multiversx-sdk:$PATH"\t# multiversx-sdk' profile_files = get_profile_files() @@ -292,7 +300,7 @@ def guide_system_path_integration(): Your shell profile files: {profile_files_formatted} -The entry (entries) to remove: +The entry (entries) to remove: {old_export_directive} ############################################################################### Make sure you UNDERSTAND the above before proceeding further. @@ -306,12 +314,12 @@ def guide_system_path_integration(): ############################################################################### It seems that the path "~/multiversx-sdk" is already configured in shell profile. -To confirm this, CHECK the shell profile (now or after the installer script ends). +To confirm this, CHECK the shell profile (now or after the installer script ends). Your shell profile files: {profile_files_formatted} -The entry to check (it should be present): +The entry to check (it should be present): {new_export_directive}. ############################################################################### Make sure you UNDERSTAND the above before proceeding further.