mshr-h commented on code in PR #17808:
URL: https://github.com/apache/tvm/pull/17808#discussion_r2039121506
##########
python/setup.py:
##########
@@ -129,6 +129,12 @@ def _remove_path(path):
LIB_LIST, __version__ = get_lib_path()
__version__ = git_describe_version(__version__)
+if not CONDA_BUILD and not INPLACE_BUILD:
+ # Wheel cleanup
+ for path in LIB_LIST:
+ _, libname = os.path.split(path)
Review Comment:
You can use `os.path.basename()`.
##########
python/tvm/_ffi/libinfo.py:
##########
@@ -143,8 +143,18 @@ def find_lib_path(name=None, search_path=None,
optional=False):
]
name = lib_dll_names + runtime_dll_names + ext_lib_dll_names
- lib_dll_path = [os.path.join(p, name) for name in lib_dll_names for p
in dll_path]
- runtime_dll_path = [os.path.join(p, name) for name in
runtime_dll_names for p in dll_path]
+ lib_dll_path = [
+ os.path.join(p, name)
+ for name in lib_dll_names
+ for p in dll_path
+ if "python/tvm" not in p
+ ]
+ runtime_dll_path = [
+ os.path.join(p, name)
+ for name in runtime_dll_names
+ for p in dll_path
+ if "python/tvm" not in p
Review Comment:
`if not p.startswith("python/tvm")` would be better.
##########
python/tvm/_ffi/libinfo.py:
##########
@@ -143,8 +143,18 @@ def find_lib_path(name=None, search_path=None,
optional=False):
]
name = lib_dll_names + runtime_dll_names + ext_lib_dll_names
- lib_dll_path = [os.path.join(p, name) for name in lib_dll_names for p
in dll_path]
- runtime_dll_path = [os.path.join(p, name) for name in
runtime_dll_names for p in dll_path]
+ lib_dll_path = [
+ os.path.join(p, name)
+ for name in lib_dll_names
+ for p in dll_path
+ if "python/tvm" not in p
Review Comment:
`if not p.startswith("python/tvm")` would be better.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]