You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/06/15 11:01:04 UTC

[GitHub] [tvm] Codle commented on issue #11726: Error during Python Package Installation

Codle commented on issue #11726:
URL: https://github.com/apache/tvm/issues/11726#issuecomment-1156326721

   I met the same problem and fixed it by changing `setup.py` by the following code:
   
   ```
   diff --git a/python/setup.py b/python/setup.py
   index 87f533a32..fb88e47ff 100644
   --- a/python/setup.py
   +++ b/python/setup.py
   @@ -192,9 +192,16 @@ if wheel_include_libs:
   
    if include_libs:
        curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
   +    LIB_DATA_FILES = []
        for i, path in enumerate(LIB_LIST):
   -        LIB_LIST[i] = os.path.relpath(path, curr_path)
   -    setup_kwargs = {"include_package_data": True, "data_files": [("tvm", LIB_LIST)]}
   +        if os.path.isfile(path):
   +            LIB_DATA_FILES.append(os.path.relpath(path, curr_path))
   +        if os.path.isdir(path):
   +            for root, dirs, files in os.walk(path):
   +                for filename in files:
   +                    file_path = os.path.join(root, filename)
   +                    LIB_DATA_FILES.append(os.path.relpath(file_path, curr_path))
   +    setup_kwargs = {"include_package_data": True, "data_files": [("tvm", LIB_DATA_FILES)]}
   ```
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org