Skip to content

Commit 2737063

Browse files
Codledriazati
authored andcommitted
[Fix] fix python setup.py file bug (#12000)
* fix setup.py bug Signed-off-by: Zhengqiang Yin <codle@outlook.com> * remove data_files field * keep a init setup_kwargs
1 parent d243f71 commit 2737063

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

python/setup.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -164,18 +164,8 @@ def is_pure(self):
164164
return False
165165

166166

167-
include_libs = False
168-
wheel_include_libs = False
169-
if not CONDA_BUILD:
170-
if "bdist_wheel" in sys.argv:
171-
wheel_include_libs = True
172-
else:
173-
include_libs = True
174-
175167
setup_kwargs = {}
176-
177-
# For bdist_wheel only
178-
if wheel_include_libs:
168+
if not CONDA_BUILD:
179169
with open("MANIFEST.in", "w") as fo:
180170
for path in LIB_LIST:
181171
if os.path.isfile(path):
@@ -190,12 +180,6 @@ def is_pure(self):
190180

191181
setup_kwargs = {"include_package_data": True}
192182

193-
if include_libs:
194-
curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
195-
for i, path in enumerate(LIB_LIST):
196-
LIB_LIST[i] = os.path.relpath(path, curr_path)
197-
setup_kwargs = {"include_package_data": True, "data_files": [("tvm", LIB_LIST)]}
198-
199183

200184
def get_package_data_files():
201185
# Relay standard libraries
@@ -253,7 +237,7 @@ def long_description_contents():
253237
)
254238

255239

256-
if wheel_include_libs:
240+
if not CONDA_BUILD:
257241
# Wheel cleanup
258242
os.remove("MANIFEST.in")
259243
for path in LIB_LIST:

0 commit comments

Comments
 (0)