You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by kp...@apache.org on 2022/07/07 19:38:36 UTC
[tvm] branch main updated: [Fix] fix python setup.py file bug (#12000)
This is an automated email from the ASF dual-hosted git repository.
kparzysz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new af4373f2fb [Fix] fix python setup.py file bug (#12000)
af4373f2fb is described below
commit af4373f2fbb6afa6827f7e3e4964bad644644d39
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: