potiuk commented on a change in pull request #19992:
URL: https://github.com/apache/airflow/pull/19992#discussion_r762527754



##########
File path: Breeze2
##########
@@ -41,11 +43,21 @@ def save_config():
 
 if needs_installation():
     print(f"(Re)Installing Breeze's virtualenv in {BUILD_BREEZE_VENV_DIR}")
-    BUILD_BREEZE_VENV_DIR.mkdir(parents=True, exist_ok=True)
-    subprocess.run([sys.executable, "-m", "venv", f"{BUILD_BREEZE_VENV_DIR}"], 
check=True)
-    subprocess.run(
-        [f"{BUILD_BREEZE_VENV_PIP}", "install", "--upgrade", "-e", "."], 
cwd=BREEZE_SOURCE_PATH, check=True
+    EnvBuilder(system_site_packages=False, upgrade=True, with_pip=True, 
prompt="breeze").create(
+        str(BUILD_BREEZE_VENV_DIR)
     )
+    if os.name == 'nt':
+        subprocess.run(
+            [f"{BUILD_BREEZE_VENV_PYTHON}.exe", "-m", "pip", "install", 
"--upgrade", "-e", "."],
+            cwd=BREEZE_SOURCE_PATH,
+            check=True,
+        )
+    else:
+        subprocess.run(
+            [f"{BUILD_BREEZE_VENV_PYTHON}", "-m", "pip", "install", 
"--upgrade", "-e", "."],
+            cwd=BREEZE_SOURCE_PATH,
+            check=True,
+        )

Review comment:
       Actually I want to add back `python -m venv` as fallback. I noticed that 
I had problems with making the API works on MacOS when I had default MacOS 
Python set as "global" Python rather than the one coming from Pyenv. 
Configuring Pyevn to work properly on MacOS is kinda not obvious in this case. 
   
   It got fixed when I set `pyenv global`
   
   The problem I had was that "ensurepip" was missing. 
   
   Is it a known  issue @uranusjr ? I might want to reproduce it and possibly 
report it.




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


Reply via email to