Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.basename(path)
_remove_path(f"tvm/{libname}")


def config_cython():
"""Try to configure cython and return cython configuration"""
Expand Down Expand Up @@ -260,5 +266,5 @@ def long_description_contents():
# Wheel cleanup
os.remove("MANIFEST.in")
for path in LIB_LIST:
_, libname = os.path.split(path)
libname = os.path.basename(path)
_remove_path(f"tvm/{libname}")
14 changes: 12 additions & 2 deletions python/tvm/_ffi/libinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 not p.endswith("python/tvm")
]
runtime_dll_path = [
os.path.join(p, name)
for name in runtime_dll_names
for p in dll_path
if not p.endswith("python/tvm")
]
ext_lib_dll_path = [os.path.join(p, name) for name in ext_lib_dll_names for p in dll_path]
if not use_runtime:
# try to find lib_dll_path
Expand Down
Loading