@@ -91,18 +91,14 @@ func (p *Provider) downloadAndExtract(version, downloadURL, archiveName string)
9191
9292// determineSourceDir determines the source directory from extracted archive
9393func determineSourceDir (extractDir string ) string {
94- if goruntime .GOOS == constants .OSWindows {
95- // Windows embeddable: files are in extractDir root
96- return extractDir
97- }
98-
99- // Unix python-build-standalone: files are in python/ subdirectory
94+ // python-build-standalone: files are in python/ subdirectory (all platforms)
10095 pythonSubdir := filepath .Join (extractDir , "python" )
10196 if _ , err := os .Stat (pythonSubdir ); err == nil {
10297 return pythonSubdir
10398 }
10499
105100 // Fallback: use extractDir if python/ doesn't exist
101+ // (e.g., Windows embeddable packages from python.org have files in root)
106102 return extractDir
107103}
108104
@@ -384,10 +380,10 @@ func (p *Provider) ExecutablePath(version string) (string, error) {
384380 // Determine executable name and path based on platform
385381 var pythonPath string
386382 if goruntime .GOOS == constants .OSWindows {
387- // Windows embeddable package has python.exe in root
383+ // Windows: python.exe is in the installation root
388384 pythonPath = filepath .Join (installPath , "python.exe" )
389385 } else {
390- // Unix has python in bin/
386+ // Unix: python is in bin/ subdirectory
391387 pythonPath = filepath .Join (installPath , "bin" , "python" )
392388 }
393389
0 commit comments