From 4733156883fd965bd116512985918d5dfbec4db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20T=C3=B3th?= Date: Thu, 16 Nov 2023 17:27:44 +0100 Subject: [PATCH] Fix circular import (#2179) * Fix circular import * Set Version: 1.0.359 --------- Co-authored-by: devops --- kevm-pyk/pyproject.toml | 2 +- kevm-pyk/src/kevm_pyk/__init__.py | 2 +- kevm-pyk/src/kevm_pyk/kdist/plugin.py | 1 + kevm-pyk/src/kevm_pyk/kompile.py | 9 +++++++-- package/version | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/kevm-pyk/pyproject.toml b/kevm-pyk/pyproject.toml index 0502c02fa9..900c06f83b 100644 --- a/kevm-pyk/pyproject.toml +++ b/kevm-pyk/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kevm-pyk" -version = "1.0.358" +version = "1.0.359" description = "" authors = [ "Runtime Verification, Inc. ", diff --git a/kevm-pyk/src/kevm_pyk/__init__.py b/kevm-pyk/src/kevm_pyk/__init__.py index 7a63623948..11aa12f2ee 100644 --- a/kevm-pyk/src/kevm_pyk/__init__.py +++ b/kevm-pyk/src/kevm_pyk/__init__.py @@ -6,4 +6,4 @@ from typing import Final -VERSION: Final = '1.0.358' +VERSION: Final = '1.0.359' diff --git a/kevm-pyk/src/kevm_pyk/kdist/plugin.py b/kevm-pyk/src/kevm_pyk/kdist/plugin.py index 15a62c6531..363ce306ef 100644 --- a/kevm-pyk/src/kevm_pyk/kdist/plugin.py +++ b/kevm-pyk/src/kevm_pyk/kdist/plugin.py @@ -33,6 +33,7 @@ def build(self, output_dir: Path, deps: dict[str, Path], args: dict[str, Any]) - enable_llvm_debug=enable_llvm_debug, verbose=verbose, ccopts=ccopts, + plugin_dir=deps['evm-semantics.plugin'], debug_build=debug_build, **self._kompile_args, ) diff --git a/kevm-pyk/src/kevm_pyk/kompile.py b/kevm-pyk/src/kevm_pyk/kompile.py index c6810a88c3..348119a808 100644 --- a/kevm-pyk/src/kevm_pyk/kompile.py +++ b/kevm-pyk/src/kevm_pyk/kompile.py @@ -10,7 +10,7 @@ from pyk.ktool.kompile import HaskellKompile, KompileArgs, LLVMKompile, LLVMKompileType, MaudeKompile from pyk.utils import run_process -from . import config, kdist +from . import config if TYPE_CHECKING: from collections.abc import Iterable @@ -57,11 +57,16 @@ def kevm_kompile( llvm_kompile_type: LLVMKompileType | None = None, enable_llvm_debug: bool = False, llvm_library: Path | None = None, + plugin_dir: Path | None = None, debug_build: bool = False, debug: bool = False, verbose: bool = False, ) -> Path: - plugin_dir = kdist.get('evm-semantics.plugin') + if plugin_dir is None: + from . import kdist + + plugin_dir = kdist.get('evm-semantics.plugin') + ccopts = list(ccopts) + _lib_ccopts(plugin_dir, debug_build=debug_build) return run_kompile( target, diff --git a/package/version b/package/version index 7e7e90ec49..20bfe53466 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -1.0.358 +1.0.359