Skip to content

Commit

Permalink
Merge pull request #441 from multiversx/deprecate-mxpy-up
Browse files Browse the repository at this point in the history
Marked `mxpy-up.py` as deprecated
  • Loading branch information
popenta authored Sep 17, 2024
2 parents 689fba6 + 47111f8 commit e585e3c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions mxpy-up.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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).")
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit e585e3c

Please sign in to comment.