forked from ace-step/ACE-Step-1.5
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_env_detection.bat
More file actions
72 lines (64 loc) · 2.03 KB
/
test_env_detection.bat
File metadata and controls
72 lines (64 loc) · 2.03 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
@echo off
setlocal enabledelayedexpansion
REM Test Environment Auto-Detection
REM This script tests the environment detection logic
echo ========================================
echo ACE-Step Environment Detection Test
echo ========================================
echo.
REM Test 1: Check if python_embeded exists
echo [Test 1] Checking for python_embeded...
if exist "%~dp0python_embeded\python.exe" (
echo [PASS] python_embeded detected
echo Location: %~dp0python_embeded\python.exe
REM Get Python version
"%~dp0python_embeded\python.exe" --version
) else (
echo [INFO] python_embeded not found
)
echo.
REM Test 2: Check if uv is available
echo [Test 2] Checking for uv command...
where uv >nul 2>&1
if !ERRORLEVEL! EQU 0 (
echo [PASS] uv detected
REM Get uv version
uv --version
) else (
echo [INFO] uv not found in PATH
echo To install uv, run: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
)
echo.
REM Test 3: Check project.scripts in pyproject.toml
echo [Test 3] Checking project scripts...
if exist "%~dp0pyproject.toml" (
echo [PASS] pyproject.toml found
echo.
echo Available scripts:
findstr /C:"acestep = " "%~dp0pyproject.toml"
findstr /C:"acestep-api = " "%~dp0pyproject.toml"
findstr /C:"acestep-download = " "%~dp0pyproject.toml"
) else (
echo [FAIL] pyproject.toml not found
)
echo.
REM Test 4: Determine which environment will be used
echo [Test 4] Environment selection logic...
if exist "%~dp0python_embeded\python.exe" (
echo [RESULT] Will use: Embedded Python ^(python_embeded^)
echo Command: python_embeded\python.exe acestep\acestep_v15_pipeline.py
) else (
where uv >nul 2>&1
if !ERRORLEVEL! EQU 0 (
echo [RESULT] Will use: uv package manager
echo Command: uv run acestep
) else (
echo [ERROR] Neither python_embeded nor uv found!
echo Please install uv or extract the portable package.
)
)
echo.
echo ========================================
echo Test Complete
echo ========================================
pause