diff --git a/conanfile.py b/conanfile.py index 36bde823..5d3cb67a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -90,7 +90,7 @@ def requirements(self): self.requires("fmt/9.1.0") self.requires("inja/3.4.0") self.requires("nlohmann_json/3.11.2") - self.requires("incbin/cci.20211107"), + self.requires("incbin/cci.20211107"), self.requires("spdlog/1.11.0") self.requires("eigen/3.4.0") self.requires("cli11/2.3.2", private=True) @@ -198,17 +198,17 @@ def package_info(self): self.cpp_info.includedirs.append(os.path.join(self.build_folder, "include")) bindir = os.path.join(self.build_folder, "bin") luadir = os.path.join(self.source_folder, "engine/lua") - pydir = os.path.join(self.build_folder, "lib/cloe/python") - py_path = os.path.join(self.source_folder, "python/python_api") + pypath_build = os.path.join(self.build_folder, "lib/cloe/python") + pypath_source = os.path.join(self.source_folder, "python/python_api") libdir = os.path.join(self.build_folder, "lib") - cloe_lib_path = libdir + cloe_bindings_path = libdir else: self.cpp_info.builddirs.append(os.path.join("lib", "cmake", "cloe")) bindir = os.path.join(self.package_folder, "bin") luadir = os.path.join(self.package_folder, "lib/cloe/lua") - pydir = os.path.join(self.package_folder, "lib/cloe/python") - py_path = pydir - cloe_lib_path = os.path.join(self.package_folder, "lib/cloe/python/cloe") + pypath_build = os.path.join(self.package_folder, "lib/cloe/python") + pypath_source = pypath_build + cloe_bindings_path = os.path.join(self.package_folder, "lib/cloe/python/cloe") libdir = None self.output.info(f"Appending PATH environment variable: {bindir}") @@ -219,7 +219,7 @@ def package_info(self): self.output.info(f"Appending LD_LIBRARY_PATH environment variable: {libdir}") self.runenv_info.append_path("LD_LIBRARY_PATH", libdir) if self.options.python_api: - self.output.info(f"Appending PYHTONPATH and CLOE_PYTHON_BINDINGS environment variables: {pydir}") - self.runenv_info.prepend_path("PYTHONPATH", str(py_path)) - self.runenv_info.prepend_path("PYTHONPATH", str(cloe_lib_path)) - self.runenv_info.prepend_path("CLOE_PYTHON_BINDINGS", str(pydir)) + self.output.info(f"Appending PYHTONPATH and CLOE_PYTHON_BINDINGS environment variables") + self.runenv_info.prepend_path("PYTHONPATH", str(pypath_source)) + self.runenv_info.prepend_path("PYTHONPATH", str(cloe_bindings_path)) + self.runenv_info.prepend_path("CLOE_PYTHON_BINDINGS", str(pypath_build)) diff --git a/python/python_api/cloe/_runner.py b/python/python_api/cloe/_runner.py index 3200bef9..af2d56b6 100644 --- a/python/python_api/cloe/_runner.py +++ b/python/python_api/cloe/_runner.py @@ -2,6 +2,7 @@ from datetime import timedelta from pathlib import Path import os +import sys from time import sleep from typing import Optional, Dict, Any from queue import Queue, Empty @@ -113,7 +114,6 @@ def run(): t = Thread(target=run) t.start() self.q.get(True) - #minimater error, no vehicle def __next__(self): return self @@ -177,9 +177,7 @@ def log_level(self, value): self._sim.log_level = value def bind_plugin_types(self, lib: Path): - import importlib import importlib.util - import sys components = str(lib.name).split('.') module_name = components[0] print(f"Attempting to load module {module_name} from {lib}") diff --git a/python/python_api/cloe/test/config_minimator_smoketest.json b/python/python_api/cloe/test/config_minimator_smoketest.json index f1f48ef9..1696455c 100644 --- a/python/python_api/cloe/test/config_minimator_smoketest.json +++ b/python/python_api/cloe/test/config_minimator_smoketest.json @@ -36,4 +36,4 @@ "action": "succeed" } ] -} \ No newline at end of file +}