Skip to content

Commit ec802c7

Browse files
committed
Remove unnecessary CDL_PYTHONEXE environment variable
1 parent 160dcad commit ec802c7

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

DataLab-demo.bat

Lines changed: 0 additions & 7 deletions
This file was deleted.

DataLab.bat

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
@echo off
2-
for %%a in ("%CDL_PYTHONEXE%") do set "p_dir=%%~dpa"
3-
for %%a in (%p_dir:~0,-1%) do set "WINPYDIRBASE=%%~dpa"
4-
call %WINPYDIRBASE%scripts\env_for_icons.bat %*
2+
REM Check if a Python executable path is provided as an argument
3+
if "%1" == "" (
4+
echo Error: Python executable path must be provided as an argument.
5+
echo Usage: DataLab.bat path\to\python.exe
6+
exit /b 1
7+
) else (
8+
REM Use the provided Python executable path
9+
set PYTHON_EXE=%1
10+
)
11+
REM Validate that the provided Python executable exists
12+
if not exist %PYTHON_EXE% (
13+
echo Error: The specified Python executable does not exist: %PYTHON_EXE%
14+
exit /b 2
15+
)
16+
517
cd/D %~dp0
618
set ORIGINAL_PYTHONPATH=%PYTHONPATH%
719
for /F "tokens=*" %%A in (.env) do (set %%A)
820
set PYTHONPATH=%PYTHONPATH%;%ORIGINAL_PYTHONPATH%
9-
start "" "%WINPYDIR%\pythonw.exe" cdl\start.pyw %*
21+
22+
REM Extract pythonw.exe from the same directory as the provided python.exe
23+
for %%a in ("%PYTHON_EXE%") do set "PYTHON_DIR=%%~dpa"
24+
start "" "%PYTHON_DIR%pythonw.exe" cdl\start.pyw %2 %3 %4 %5 %6 %7 %8 %9

doc/contributing/environment.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ Building PDF documentation requires LaTeX. On Windows, the following environment
102102
Visual Studio Code configuration used in `launch.json` and/or `tasks.json`
103103
(examples) :
104104

105-
@REM Development environment
106-
set CDL_PYTHONEXE=C:\python-3.9.10.amd64\python.exe
107105
@REM Folder containing additional working test data
108106
set CDL_DATA=C:\Dev\Projets\CDL_data
109107

0 commit comments

Comments
 (0)