This is an automated email from the ASF dual-hosted git repository.
tqchen 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 c6969d7238 [Refactor] Build cython with isolate environment (#18124)
c6969d7238 is described below
commit c6969d7238c8010615e4cf07151821c0c5118cda
Author: Lei Wang <[email protected]>
AuthorDate: Tue Jul 8 20:19:35 2025 +0800
[Refactor] Build cython with isolate environment (#18124)
Update CMakeLists.txt to include Python isolation flag and clean up
setup.py by removing unused import
---
CMakeLists.txt | 2 +-
python/setup.py | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e96a7b159..b90fc43e05 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -694,7 +694,7 @@ if(NOT DEFINED ENV{CONDA_BUILD})
message(STATUS ${CMAKE_CURRENT_BINARY_DIR})
add_custom_target(
tvm_cython ALL
- ${Python_EXECUTABLE} setup.py build_ext --inplace
+ ${Python_EXECUTABLE} -I setup.py build_ext --inplace
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python
)
add_dependencies(tvm_cython tvm)
diff --git a/python/setup.py b/python/setup.py
index 679f5078d3..cf2eff2a3a 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -20,7 +20,6 @@ import os
import pathlib
import shutil
import sys
-import sys
from setuptools import find_packages
from setuptools.dist import Distribution