File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 11@ ECHO OFF
2+ setlocal EnableDelayedExpansion
23
34rem Copyright (c) Meta Platforms, Inc. and affiliates.
45rem All rights reserved.
@@ -7,9 +8,24 @@ rem This batch file provides a basic functionality similar to the bash script.
78
89cd /d " %~dp0 "
910
11+ rem Verify that Git checked out symlinks correctly. Without this the Python install
12+ rem will fail when attempting to copy files from src\executorch.
13+ where git > NUL 2 >& 1
14+ if not errorlevel 1 (
15+ set " GIT_SYMLINKS = "
16+ for /f " usebackq delims=" %%i in (`git config --get core.symlinks 2^ > nul `) do set " GIT_SYMLINKS = %%i "
17+ if /I not " !GIT_SYMLINKS! " == " true" (
18+ echo ExecuTorch requires Git symlink support on Windows.
19+ echo Enable Developer Mode and run: git config --global core.symlinks true
20+ echo Re-clone the repository after enabling symlinks, then rerun install_executorch.bat.
21+ exit /b 1
22+ )
23+ )
24+
1025rem Under windows, it's always python
1126set PYTHON_EXECUTABLE = python
1227
1328" %PYTHON_EXECUTABLE% " install_executorch.py %*
1429
15- exit /b %ERRORLEVEL%
30+ set " EXIT_CODE = %ERRORLEVEL% "
31+ endlocal & exit /b %EXIT_CODE%
Original file line number Diff line number Diff line change @@ -635,9 +635,6 @@ def run(self):
635635 dst_root = self .get_package_dir ("." )
636636 else :
637637 dst_root = os .path .join (self .build_lib , "executorch" )
638- # On Windows the package directory might not exist yet when building from a
639- # clean tree. Ensure it is created before we attempt to write version.py.
640- self .mkpath (dst_root )
641638 # Create the version file.
642639 Version .write_to_python_file (os .path .join (dst_root , "version.py" ))
643640
You can’t perform that action at this time.
0 commit comments