File tree Expand file tree Collapse file tree 2 files changed +22
-17
lines changed Expand file tree Collapse file tree 2 files changed +22
-17
lines changed Original file line number Diff line number Diff line change
1
+ @ echo off
2
+
3
+ set need_set_pythonpath = 1
4
+ for %%x in (python.exe) do set python_exe_path = %%~$PATH:x
5
+ for /f " delims=" %%p in ('echo %python_exe_path% \..\lib\site-packages\quecpython') do set quecpython_path = %%~fp
6
+ if " %PYTHONPATH% " == " " (
7
+ echo The path is not set, will be set now.
8
+ set PYTHONPATH = %quecpython_path%
9
+ ) else (
10
+ echo %PYTHONPATH% | findstr /C:" %quecpython_path% " > nul
11
+ if errorlevel 1 (
12
+ echo The path is not set, will be set now.
13
+ set PYTHONPATH = %PYTHONPATH% ;%quecpython_path%
14
+ ) else (
15
+ echo The path is set before, won't be set again.
16
+ set need_set_pythonpath = 0
17
+ )
18
+ )
19
+
20
+ if %need_set_pythonpath% == 1 (
21
+ setx PYTHONPATH %PYTHONPATH%
22
+ )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments