Skip to content

Commit f140a35

Browse files
committed
fixup! fix: Implement review findings
1 parent 42e1ffa commit f140a35

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

conanfile.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -198,17 +198,17 @@ def package_info(self):
198198
self.cpp_info.includedirs.append(os.path.join(self.build_folder, "include"))
199199
bindir = os.path.join(self.build_folder, "bin")
200200
luadir = os.path.join(self.source_folder, "engine/lua")
201-
pydir = os.path.join(self.build_folder, "lib/cloe/python")
202-
py_path = os.path.join(self.source_folder, "python/python_api")
201+
pypath_build = os.path.join(self.build_folder, "lib/cloe/python")
202+
pypath_source = os.path.join(self.source_folder, "python/python_api")
203203
libdir = os.path.join(self.build_folder, "lib")
204-
cloe_lib_path = libdir
204+
cloe_bindings_path = libdir
205205
else:
206206
self.cpp_info.builddirs.append(os.path.join("lib", "cmake", "cloe"))
207207
bindir = os.path.join(self.package_folder, "bin")
208208
luadir = os.path.join(self.package_folder, "lib/cloe/lua")
209-
pydir = os.path.join(self.package_folder, "lib/cloe/python")
210-
py_path = pydir
211-
cloe_lib_path = os.path.join(self.package_folder, "lib/cloe/python/cloe")
209+
pypath_build = os.path.join(self.package_folder, "lib/cloe/python")
210+
pypath_source = pypath_build
211+
cloe_bindings_path = os.path.join(self.package_folder, "lib/cloe/python/cloe")
212212
libdir = None
213213

214214
self.output.info(f"Appending PATH environment variable: {bindir}")
@@ -219,7 +219,7 @@ def package_info(self):
219219
self.output.info(f"Appending LD_LIBRARY_PATH environment variable: {libdir}")
220220
self.runenv_info.append_path("LD_LIBRARY_PATH", libdir)
221221
if self.options.python_api:
222-
self.output.info(f"Appending PYHTONPATH and CLOE_PYTHON_BINDINGS environment variables: {pydir}")
223-
self.runenv_info.prepend_path("PYTHONPATH", str(py_path))
224-
self.runenv_info.prepend_path("PYTHONPATH", str(cloe_lib_path))
225-
self.runenv_info.prepend_path("CLOE_PYTHON_BINDINGS", str(pydir))
222+
self.output.info(f"Appending PYHTONPATH and CLOE_PYTHON_BINDINGS environment variables")
223+
self.runenv_info.prepend_path("PYTHONPATH", str(pypath_source))
224+
self.runenv_info.prepend_path("PYTHONPATH", str(cloe_bindings_path))
225+
self.runenv_info.prepend_path("CLOE_PYTHON_BINDINGS", str(pypath_build))

python/python_api/cloe/_runner.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from datetime import timedelta
33
from pathlib import Path
44
import os
5+
import sys
56
from time import sleep
67
from typing import Optional, Dict, Any
78
from queue import Queue, Empty
@@ -113,7 +114,6 @@ def run():
113114
t = Thread(target=run)
114115
t.start()
115116
self.q.get(True)
116-
#minimater error, no vehicle
117117

118118
def __next__(self):
119119
return self
@@ -177,9 +177,7 @@ def log_level(self, value):
177177
self._sim.log_level = value
178178

179179
def bind_plugin_types(self, lib: Path):
180-
import importlib
181180
import importlib.util
182-
import sys
183181
components = str(lib.name).split('.')
184182
module_name = components[0]
185183
print(f"Attempting to load module {module_name} from {lib}")

python/python_api/cloe/test/config_minimator_smoketest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@
3636
"action": "succeed"
3737
}
3838
]
39-
}
39+
}

0 commit comments

Comments
 (0)