uranusjr commented on a change in pull request #19992:
URL: https://github.com/apache/airflow/pull/19992#discussion_r762525565
##########
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:
Windows appends the executable extension automatically, so you don’t
need to append `.exe` on your own. The behaviour is not exactly the same—it
uses `PATHEXT`, which contains more than just `.exe`, so theoratically this may
pick up a `python.bat`—but only with negligible difference.
--
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]