From 1ba3a95ca895392ae3563ebec3c7cc63f9814c65 Mon Sep 17 00:00:00 2001 From: Sanhe Date: Wed, 13 Apr 2022 11:25:24 -0400 Subject: [PATCH] 1.0.8 --- aws_tools/_version.py | 2 +- aws_tools/handlers/aws.py | 2 +- aws_tools/handlers/aws_tools.py | 8 +++---- aws_tools/handlers/item_builder/__init__.py | 12 +++++------ info.plist | 24 ++++++++++----------- release-history.rst | 11 ++++++++-- version | 2 +- 7 files changed, 34 insertions(+), 27 deletions(-) diff --git a/aws_tools/_version.py b/aws_tools/_version.py index dddcaa2..d375d6a 100644 --- a/aws_tools/_version.py +++ b/aws_tools/_version.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -__version__ = "1.0.7" +__version__ = "1.0.8" if __name__ == "__main__": print(__version__) diff --git a/aws_tools/handlers/aws.py b/aws_tools/handlers/aws.py index 52d008d..d6a3114 100644 --- a/aws_tools/handlers/aws.py +++ b/aws_tools/handlers/aws.py @@ -144,7 +144,7 @@ def sh_top20_main_service(self, wf): icon=HotIcons.info, valid=True, ) - cmd = "/usr/bin/python main.py '{} {}'".format("mh_rebuild_index", "do-build-index") + cmd = "~/.pyenv/shims/python2.7 main.py '{} {}'".format("mh_rebuild_index", "do-build-index") item_arg.run_script(cmd) item_arg.open_file(path=DIR_AWS_TOOL_USER_DATA.abspath) item_arg.notify(title="AWS Console url index is rebuilt!") diff --git a/aws_tools/handlers/aws_tools.py b/aws_tools/handlers/aws_tools.py index e17f297..0cfe17f 100644 --- a/aws_tools/handlers/aws_tools.py +++ b/aws_tools/handlers/aws_tools.py @@ -31,7 +31,7 @@ def mh_clear_aws_tools_cache(self, wf, query_str): if query_str == magic_command: cache.clear() return wf - cmd = "/usr/bin/python main.py '{} {}'".format(self.mh_clear_aws_tools_cache.__name__, magic_command) + cmd = "~/.pyenv/shims/python2.7 main.py '{} {}'".format(self.mh_clear_aws_tools_cache.__name__, magic_command) item_arg = ItemArgs( title="Clear AWS tools workflow cache data", subtitle="hit 'Enter' to clear cache", @@ -143,7 +143,7 @@ def handle_wrong_setting_key(wf, st_key): icon=HotIcons.run, valid=True, ) - cmd = "/usr/bin/python main.py '{} {} {}'".format( + cmd = "~/.pyenv/shims/python2.7 main.py '{} {} {}'".format( self.mh_set_value.__name__, st_key, st_value, @@ -165,7 +165,7 @@ def mh_rebuild_index(self, wf, query_str): main_service_searcher.build_index(force_rebuild=True) sub_service_searcher.build_index(force_rebuild=True) return wf - cmd = "/usr/bin/python main.py '{} {}'".format(self.mh_rebuild_index.__name__, magic_command) + cmd = "~/.pyenv/shims/python2.7 main.py '{} {}'".format(self.mh_rebuild_index.__name__, magic_command) item_arg = ItemArgs( title="Rebuild AWS console url index", subtitle="hit 'Enter' to rebuild the index", @@ -183,7 +183,7 @@ def mh_clear_log(self, wf, query_str): if query_str == magic_command: clear_log() return wf - cmd = "/usr/bin/python main.py '{} {}'".format(self.mh_clear_log.__name__, magic_command) + cmd = "~/.pyenv/shims/python2.7 main.py '{} {}'".format(self.mh_clear_log.__name__, magic_command) item_arg = ItemArgs( title="Clear all log files", subtitle="hit 'Enter' to clear the log", diff --git a/aws_tools/handlers/item_builder/__init__.py b/aws_tools/handlers/item_builder/__init__.py index ca6b844..76aaa22 100644 --- a/aws_tools/handlers/item_builder/__init__.py +++ b/aws_tools/handlers/item_builder/__init__.py @@ -27,7 +27,7 @@ def select_aws_profile_as_default( :rtype: Workflow3 """ for aws_profile in aws_profile_list: - cmd = "/usr/bin/python main.py '{} {}'".format( + cmd = "~/.pyenv/shims/python2.7 main.py '{} {}'".format( set_default_aws_profile_handler_id, aws_profile, ) @@ -56,7 +56,7 @@ def select_aws_profile_for_mfa( :rtype: Workflow3 """ for aws_profile in aws_profile_list: - cmd = "/usr/bin/python main.py '{} {}'".format( + cmd = "~/.pyenv/shims/python2.7 main.py '{} {}'".format( execute_mfa_auth_handler_id, aws_profile, ) @@ -85,7 +85,7 @@ def set_aws_profile_as_aws_tools_default( :rtype: Workflow3 """ for aws_profile in aws_profile_list: - cmd = "/usr/bin/python main.py '{} {}'".format( + cmd = "~/.pyenv/shims/python2.7 main.py '{} {}'".format( set_aws_profile_as_aws_tools_default_handler_id, aws_profile, ) @@ -114,7 +114,7 @@ def set_aws_region_as_aws_tools_default( :rtype: Workflow3 """ for long_name, short_name in all_regions: - cmd = "/usr/bin/python main.py '{} {}'".format( + cmd = "~/.pyenv/shims/python2.7 main.py '{} {}'".format( set_aws_region_as_aws_tools_default_handler_id, short_name, ) @@ -143,12 +143,12 @@ def set_aws_profile_as_default_for_everything( :rtype: Workflow3 """ for aws_profile, region in aws_profile_and_region_list: - cmd = "/usr/bin/python main.py '{} {}'".format( + cmd = "~/.pyenv/shims/python2.7 main.py '{} {}'".format( set_aws_profile_as_default_for_everything_handler_id, "{}____{}".format(aws_profile, region), ) item_arg = ItemArgs( - title="{} {}".format(aws_profile, region), + title="{} | {}".format(aws_profile, region), subtitle="set default profile as [{}] for everything".format(aws_profile), autocomplete=aws_profile, icon=HotIcons.iam, diff --git a/info.plist b/info.plist index aaedd3c..5c66b45 100644 --- a/info.plist +++ b/info.plist @@ -592,7 +592,7 @@ runningsubtext please wait ... script - /usr/bin/python main.py 'mh_select_aws_profile_to_set_as_default {query}' + ~/.pyenv/shims/python2.7 main.py 'mh_select_aws_profile_to_set_as_default {query}' scriptargtype 0 scriptfile @@ -656,7 +656,7 @@ runningsubtext please wait ... script - /usr/bin/python main.py 'mh_info {query}' + ~/.pyenv/shims/python2.7 main.py 'mh_info {query}' scriptargtype 0 scriptfile @@ -743,7 +743,7 @@ runningsubtext please wait ... script - /usr/bin/python main.py 'mh_select_aws_profile_for_mfa_auth {query}' + ~/.pyenv/shims/python2.7 main.py 'mh_select_aws_profile_for_mfa_auth {query}' scriptargtype 0 scriptfile @@ -811,7 +811,7 @@ runningsubtext please wait ... script - /usr/bin/python main.py 'mh_clear_aws_tools_cache {query}' + ~/.pyenv/shims/python2.7 main.py 'mh_clear_aws_tools_cache {query}' scriptargtype 0 scriptfile @@ -902,7 +902,7 @@ runningsubtext please wait ... script - /usr/bin/python main.py 'mh_select_aws_profile_to_set_as_aws_tools_default {query}' + ~/.pyenv/shims/python2.7 main.py 'mh_select_aws_profile_to_set_as_aws_tools_default {query}' scriptargtype 0 scriptfile @@ -1010,7 +1010,7 @@ runningsubtext please wait ... script - /usr/bin/python main.py 'mh_select_aws_region_to_set_as_aws_tools_default {query}' + ~/.pyenv/shims/python2.7 main.py 'mh_select_aws_region_to_set_as_aws_tools_default {query}' scriptargtype 0 scriptfile @@ -1097,7 +1097,7 @@ runningsubtext please wait ... script - /usr/bin/python main.py 'mh_set {query}' + ~/.pyenv/shims/python2.7 main.py 'mh_set {query}' scriptargtype 0 scriptfile @@ -1146,7 +1146,7 @@ runningsubtext please wait ... script - /usr/bin/python main.py 'mh_rebuild_index {query}' + ~/.pyenv/shims/python2.7 main.py 'mh_rebuild_index {query}' scriptargtype 0 scriptfile @@ -1214,7 +1214,7 @@ runningsubtext please wait ... script - /usr/bin/python main.py 'mh_clear_log {query}' + ~/.pyenv/shims/python2.7 main.py 'mh_clear_log {query}' scriptargtype 0 scriptfile @@ -1263,7 +1263,7 @@ runningsubtext please wait ... script - /usr/bin/python main.py 'mh_select_aws_profile_to_set_as_default_for_everything {query}' + ~/.pyenv/shims/python2.7 main.py 'mh_select_aws_profile_to_set_as_default_for_everything {query}' scriptargtype 0 scriptfile @@ -1312,7 +1312,7 @@ runningsubtext please wait ... script - /usr/bin/python main.py 'mh_aws {query}' + ~/.pyenv/shims/python2.7 main.py 'mh_aws {query}' scriptargtype 0 scriptfile @@ -1503,7 +1503,7 @@ variablesdontexport version - 1.0.6 + 1.0.8 webaddress https://github.com/MacHu-GWU/afwf_aws_tools-project diff --git a/release-history.rst b/release-history.rst index 0b40eb9..e93b888 100644 --- a/release-history.rst +++ b/release-history.rst @@ -4,7 +4,7 @@ Release and Version History ============================================================================== -1.0.8 (TODO) +1.0.9 (TODO) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **Features and Improvements** @@ -15,7 +15,14 @@ Release and Version History **Miscellaneous** -1.0.7 (TODO) +1.0.8 (2022-04-13) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +**Features and Improvements** + +- MacOS may not support system Python2 anymore after 12.3. Now user has to install their own Python2 using `pyenv `_. Please follow the installation guide and use this command ``pyenv install 2.7.18`` to install the python2 and make sure ``~/.pyenv/shims/python2.7`` + + +1.0.7 (2022-03-06) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **Features and Improvements** diff --git a/version b/version index 238d6e8..b0f3d96 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.0.7 +1.0.8