-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_vendor.bat
More file actions
43 lines (35 loc) · 1.14 KB
/
Copy pathupdate_vendor.bat
File metadata and controls
43 lines (35 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@echo off
setlocal EnableDelayedExpansion
:: ============================================================================
:: Refresh bundled vendor/ wheels for offline Windows installation.
:: Run this on a machine with internet access, then commit vendor/.
:: ============================================================================
echo.
echo Updating vendor/ wheels for offline installation...
echo.
set "SCRIPT_DIR=%~dp0"
set "VENDOR_DIR=%SCRIPT_DIR%vendor"
set "REQ_FILE=%SCRIPT_DIR%requirements-lock.txt"
if not exist "%REQ_FILE%" (
echo [ERROR] requirements-lock.txt not found.
pause
exit /b 1
)
:: Clean old wheels
if exist "%VENDOR_DIR%" (
echo Removing old wheels...
rd /s /q "%VENDOR_DIR%"
)
mkdir "%VENDOR_DIR%"
:: Download for Python 3.10, 3.11, 3.12 — Windows x64
for %%v in (310 311 312) do (
echo Downloading wheels for Python %%v win_amd64...
pip download -r "%REQ_FILE%" --platform win_amd64 --python-version %%v --only-binary=:all: -d "%VENDOR_DIR%" --quiet 2>&1
)
echo.
echo Done. Vendor directory:
dir /b "%VENDOR_DIR%\*.whl" | find /c ".whl"
echo wheel files in %VENDOR_DIR%
echo.
pause
endlocal