Skip to content

Commit 29aafb1

Browse files
committed
Renamed VENVPythonExe to PythonExecutable
1 parent f9ab2dc commit 29aafb1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Source/PythonEngine.pas

+6-6
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ TPythonType = class; //forward declaration
20032003
{$IFEND}
20042004
TPythonEngine = class(TPythonInterface)
20052005
private
2006-
FVenvPythonExe: string;
2006+
FPythonExecutable: string;
20072007
FInitScript: TStrings;
20082008
FIO: TPythonInputOutput;
20092009
FRedirectIO: Boolean;
@@ -2153,7 +2153,7 @@ TPythonEngine = class(TPythonInterface)
21532153
property PythonPath: UnicodeString read FPythonPath write FPythonPath;
21542154
published
21552155
property AutoFinalize: Boolean read FAutoFinalize write FAutoFinalize default True;
2156-
property VenvPythonExe: string read FVenvPythonExe write FVenvPythonExe;
2156+
property PythonExecutable: string read FPythonExecutable write FPythonExecutable;
21572157
property DatetimeConversionMode: TDatetimeConversionMode read FDatetimeConversionMode write FDatetimeConversionMode default DEFAULT_DATETIME_CONVERSION_MODE;
21582158
property InitScript: TStrings read FInitScript write SetInitScript;
21592159
property IO: TPythonInputOutput read FIO write SetIO;
@@ -4760,10 +4760,10 @@ procedure TPythonEngine.Initialize;
47604760
PPWcharT(PByte(@Config) + ConfigOffests[MinorVersion, TConfigFields.home]),
47614761
PWCharT(StringToWCharTString(FPythonHome)));
47624762
// Set venv executable if available
4763-
if FVenvPythonExe <> '' then
4763+
if FPythonExecutable <> '' then
47644764
PyConfig_SetString(Config,
47654765
PPWcharT(PByte(@Config) + ConfigOffests[MinorVersion, TConfigFields.executable]),
4766-
PWCharT(StringToWCharTString(FVenvPythonExe)));
4766+
PWCharT(StringToWCharTString(FPythonExecutable)));
47674767

47684768
// Set program arguments (sys.argv)
47694769
SetProgramArgs(Config);
@@ -4872,8 +4872,8 @@ procedure TPythonEngine.Initialize;
48724872
if FPythonHome <> '' then
48734873
PyInitConfig_SetStr(Config, 'home', PAnsiChar(EncodeString(FPythonHome)));
48744874
// Set venv executable if available
4875-
if FVenvPythonExe <> '' then
4876-
PyInitConfig_SetStr(Config, 'executable', PAnsiChar(EncodeString(FPythonHome)));
4875+
if FPythonExecutable <> '' then
4876+
PyInitConfig_SetStr(Config, 'executable', PAnsiChar(EncodeString(FPythonExecutable)));
48774877

48784878
// Set program arguments (sys.argv)
48794879
SetProgramArgs(Config);

Source/PythonVersions.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ procedure TPythonVersion.AssignTo(PythonEngine: TPersistent);
127127
TPythonEngine(PythonEngine).DllPath := DLLPath;
128128
TPythonEngine(PythonEngine).APIVersion := ApiVersion;
129129
if Is_venv then begin
130-
TPythonEngine(PythonEngine).VenvPythonExe := PythonExecutable;
130+
TPythonEngine(PythonEngine).PythonExecutable := PythonExecutable;
131131
TPythonEngine(PythonEngine).SetPythonHome(DLLPath);
132132
end else
133133
{

0 commit comments

Comments
 (0)