You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by dr...@apache.org on 2022/07/12 23:21:04 UTC
[tvm] 01/01: [Fix] fix python setup.py file bug (#12000)
This is an automated email from the ASF dual-hosted git repository.
driazati pushed a commit to branch v0.9.0
in repository https://gitbox.apache.org/repos/asf/tvm.git
commit 7b1005bcdf6ffe10af2be4cbe1e65a42def17075
Author: Zhengqiang Yin <co...@outlook.com>
AuthorDate: Fri Jul 8 03:38:27 2022 +0800
[Fix] fix python setup.py file bug (#12000)
* fix setup.py bug
Signed-off-by: Zhengqiang Yin <co...@outlook.com>
* remove data_files field
* keep a init setup_kwargs
---
python/setup.py | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/python/setup.py b/python/setup.py
index 87f533a329..a7ba115e0a 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -164,18 +164,8 @@ class BinaryDistribution(Distribution):
return False
-include_libs = False
-wheel_include_libs = False
-if not CONDA_BUILD:
- if "bdist_wheel" in sys.argv:
- wheel_include_libs = True
- else:
- include_libs = True
-
setup_kwargs = {}
-
-# For bdist_wheel only
-if wheel_include_libs:
+if not CONDA_BUILD:
with open("MANIFEST.in", "w") as fo:
for path in LIB_LIST:
if os.path.isfile(path):
@@ -190,12 +180,6 @@ if wheel_include_libs:
setup_kwargs = {"include_package_data": True}
-if include_libs:
- 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)]}
-
def get_package_data_files():
# Relay standard libraries
@@ -253,7 +237,7 @@ setup(
)
-if wheel_include_libs:
+if not CONDA_BUILD:
# Wheel cleanup
os.remove("MANIFEST.in")
for path in LIB_LIST: