yaoyaoding commented on code in PR #283:
URL: https://github.com/apache/tvm-ffi/pull/283#discussion_r2552428980


##########
CMakeLists.txt:
##########
@@ -208,6 +208,10 @@ option(TVM_FFI_BUILD_PYTHON_MODULE "Adding python module." 
OFF)
 if (TVM_FFI_BUILD_PYTHON_MODULE)
   # Helper function to build the cython module
   message(STATUS "Building cython module..")
+
+  # prefer virtualenv when searching for python
+  set(Python_FIND_VIRTUALENV FIRST) # cmake-lint: disable=C0103

Review Comment:
   See the documentation of 
[FindPython](https://cmake.org/cmake/help/latest/module/FindPython.html). This 
flag allows cmake to first use the python in the virtual env to build, when the 
virtualenv is activated. It's the desired behavior when the user is working in 
a virtualenv (like venv created by uv).
   
   I add this modification to this PR since it's a small change. Happy to 
create a standalone one if needed.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to