From 69d173164bb2aafba04573346b2e21938dc67dea Mon Sep 17 00:00:00 2001 From: Vivien Oddou Date: Thu, 7 Dec 2023 17:14:21 +0900 Subject: [PATCH 1/5] attempt at deploy script to work from 3p-packages-source Signed-off-by: Vivien Oddou --- test.and.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.and.py b/test.and.py index 1fe7ee4..3ea1a8b 100644 --- a/test.and.py +++ b/test.and.py @@ -20,7 +20,7 @@ import re import importlib sys.path.append("tests") -from clr import * +from tests.clr import * testList = ['Syntax', 'Semantic', 'Advanced', 'Samples'] From a91195d556404e287889d22aace303d2447c688e Mon Sep 17 00:00:00 2001 From: Vivien Oddou Date: Thu, 7 Dec 2023 17:32:58 +0900 Subject: [PATCH 2/5] Attempt at fixing package making scripts. In face of "testapp.py", line 121 NameEffor because of `fg.` Signed-off-by: Vivien Oddou --- tests/testapp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testapp.py b/tests/testapp.py index 43396f0..2ee0bfe 100644 --- a/tests/testapp.py +++ b/tests/testapp.py @@ -11,6 +11,7 @@ import io from argparse import ArgumentParser from os.path import join, normpath, basename +sys.path.append(os.path.dirname(os.path.abspath(__file__))) from clr import * import re import testfuncs From 20de71f0d5833209fa18b09bff2fa170a47cab5b Mon Sep 17 00:00:00 2001 From: Vivien Oddou Date: Thu, 7 Dec 2023 17:54:30 +0900 Subject: [PATCH 3/5] Trying to understand why the 3p package still fails using explicit import names. Signed-off-by: Vivien Oddou --- tests/testapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testapp.py b/tests/testapp.py index 2ee0bfe..f3c5e0c 100644 --- a/tests/testapp.py +++ b/tests/testapp.py @@ -12,7 +12,7 @@ from argparse import ArgumentParser from os.path import join, normpath, basename sys.path.append(os.path.dirname(os.path.abspath(__file__))) -from clr import * +from clr import fg, bg, style import re import testfuncs import importlib From c4b885540870efa7075c62c29add642b804c0c30 Mon Sep 17 00:00:00 2001 From: Vivien Oddou Date: Thu, 7 Dec 2023 18:55:11 +0900 Subject: [PATCH 4/5] Radical attempt Signed-off-by: Vivien Oddou --- tests/testapp.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/testapp.py b/tests/testapp.py index f3c5e0c..5532211 100644 --- a/tests/testapp.py +++ b/tests/testapp.py @@ -11,8 +11,15 @@ import io from argparse import ArgumentParser from os.path import join, normpath, basename -sys.path.append(os.path.dirname(os.path.abspath(__file__))) -from clr import fg, bg, style +import inspect +clrpath = os.path.join(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))), "clr.py") +print(f"clr path is {clrpath}") +import importlib.util +spec = importlib.util.spec_from_file_location("clr", clrpath) +clrmodule = importlib.util.module_from_spec(spec) +sys.modules["clr"] = clrmodule +spec.loader.exec_module(clrmodule) +globals().update({v: vars(clrmodule)[v] for v in ["fg", "bg", "style"]}) import re import testfuncs import importlib From f91d06384b1afd6ef90862028645721db4136e1e Mon Sep 17 00:00:00 2001 From: Vivien Oddou Date: Fri, 15 Dec 2023 10:49:43 +0900 Subject: [PATCH 5/5] try to cater to 3p environment Signed-off-by: Vivien Oddou --- prepare_solution_win.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prepare_solution_win.bat b/prepare_solution_win.bat index 7771b0f..410b7a7 100644 --- a/prepare_solution_win.bat +++ b/prepare_solution_win.bat @@ -8,7 +8,7 @@ REM set platform=win set architecture=x64 -set generator="Visual Studio 16 2019" +set generator="Visual Studio 17 2022" set curr_dir=%~dp0 set src_path=%curr_dir%\src