From e82b90aba99c3c703eacf9d9fd9710438d795f25 Mon Sep 17 00:00:00 2001 From: "dustin.wei" Date: Thu, 23 Nov 2023 20:43:57 +0800 Subject: [PATCH] build 0.2.4 --- setup.py | 2 +- thonnycontrib/quecpython/__init__.py | 4 ++++ thonnycontrib/quecpython/backend/bare_metal_backend.py | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 600e8fa..b119617 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages -VERSION = "0.2.3" +VERSION = "0.2.4" def readme(): diff --git a/thonnycontrib/quecpython/__init__.py b/thonnycontrib/quecpython/__init__.py index 94627b9..216c7a9 100644 --- a/thonnycontrib/quecpython/__init__.py +++ b/thonnycontrib/quecpython/__init__.py @@ -11,6 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import sys +from pathlib import Path +# make sure thonnycontrib in sys.path +sys.path.insert(0, str(Path(__file__).parent.parent.parent)) from thonny import get_workbench from .backend.mp_front import ( diff --git a/thonnycontrib/quecpython/backend/bare_metal_backend.py b/thonnycontrib/quecpython/backend/bare_metal_backend.py index 83ec205..22c1182 100644 --- a/thonnycontrib/quecpython/backend/bare_metal_backend.py +++ b/thonnycontrib/quecpython/backend/bare_metal_backend.py @@ -21,6 +21,9 @@ from logging import getLogger from textwrap import dedent, indent from typing import BinaryIO, Callable, List, Optional, Union +from pathlib import Path +# make sure thonnycontrib in sys.path +sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent)) # make sure thonny folder is in sys.path (relevant in dev) thonny_container = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))))