Codle commented on code in PR #12000:
URL: https://github.com/apache/tvm/pull/12000#discussion_r915118964


##########
python/setup.py:
##########
@@ -194,7 +194,15 @@ def is_pure(self):
     curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
     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)]}
+    LIB_DATA_FILES = []
+    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)]}

Review Comment:
   the unzipped .egg file:
   ```
   .
   ├── EGG-INFO
   │   ├── PKG-INFO
   │   ├── SOURCES.txt
   │   ├── dependency_links.txt
   │   ├── entry_points.txt
   │   ├── native_libs.txt
   │   ├── not-zip-safe
   │   ├── requires.txt
   │   └── top_level.txt
   ├── tvm
   │   ├── __init__.py
   │   ├── _ffi
   │   ├── arith
   │   ├── auto_scheduler
   │   ├── autotvm
   │   ├── configs
   │   ├── contrib
   │   ├── driver
   │   ├── error.py
   │   ├── exec
   │   ├── generic.py
   │   ├── ir
   │   ├── libtvm.so
   │   ├── libtvm_runtime.so
   │   ├── meta_schedule
   │   ├── micro
   │   ├── microtvm_template_projects
   │   ├── parser
   │   ├── relay
   │   ├── rpc
   │   ├── runtime
   │   ├── script
   │   ├── standalone_crt
   │   ├── support.py
   │   ├── target
   │   ├── te
   │   ├── testing
   │   ├── tir
   │   ├── topi
   │   └── utils
   └── tvm-0.9.dev1754+g2a71c380e-py3.8-linux-x86_64.egg
   ```
   
   the `standalone_crt` folder:
   ```
   (base) ➜ tree standalone_crt -L 2
   standalone_crt
   ├── Makefile
   ├── host
   │   └── Makefile
   ├── include
   │   ├── checksum.h
   │   ├── dlpack
   │   ├── dmlc
   │   └── tvm
   ├── src
   │   ├── runtime
   │   └── support
   └── template
       ├── crt_config-template.h
       └── host
   ```
   
   



-- 
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]

Reply via email to