From 219aa9632a9641f154d26c9cd91b58baa85234a9 Mon Sep 17 00:00:00 2001 From: siliconvoodoo Date: Tue, 19 Dec 2023 02:52:50 +0900 Subject: [PATCH] Release 1.8.19 (#87) * attempt at deploy script to work from 3p-packages-source Signed-off-by: Vivien Oddou * Attempt at fixing package making scripts. In face of "testapp.py", line 121 NameEffor because of `fg.` Signed-off-by: Vivien Oddou * Trying to understand why the 3p package still fails using explicit import names. Signed-off-by: Vivien Oddou * Radical attempt Signed-off-by: Vivien Oddou * try to cater to 3p environment Signed-off-by: Vivien Oddou --------- Signed-off-by: Vivien Oddou --- prepare_solution_win.bat | 2 +- test.and.py | 2 +- tests/testapp.py | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) 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 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'] diff --git a/tests/testapp.py b/tests/testapp.py index 43396f0..5532211 100644 --- a/tests/testapp.py +++ b/tests/testapp.py @@ -11,7 +11,15 @@ import io from argparse import ArgumentParser from os.path import join, normpath, basename -from clr import * +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