Skip to content

Commit

Permalink
fixup! fix: Implement review findings
Browse files Browse the repository at this point in the history
  • Loading branch information
CzBalti committed May 15, 2024
1 parent 42e1ffa commit f140a35
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
20 changes: 10 additions & 10 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand All @@ -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))
4 changes: 1 addition & 3 deletions python/python_api/cloe/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"action": "succeed"
}
]
}
}

0 comments on commit f140a35

Please sign in to comment.