Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 786cb11

Browse files
author
Just van Rossum
committed
Fixed two typo's (Plugins -> PlugIns) and added some explicit path munging to allow the script to also work from the Scripts folder. Somehow either of these fixes solved a problem where it suddenly refused to make a PythonCore alias in the Extensions folder. -- jvr
1 parent 292f4c4 commit 786cb11

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Mac/scripts/ConfigurePython.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ def gotopluginfolder():
8989
"""Go to the plugin folder, assuming we are somewhere in the Python tree"""
9090
import os
9191

92-
while not os.path.isdir(":Mac:Plugins"):
92+
while not os.path.isdir(":Mac:PlugIns"):
9393
os.chdir("::")
94-
os.chdir(":Mac:Plugins")
94+
os.chdir(":Mac:PlugIns")
9595
if verbose: print "current directory is", os.getcwd()
9696

9797
def loadtoolboxmodules():
@@ -146,16 +146,16 @@ def mkcorealias(src, altsrc):
146146
import macostools
147147
version = string.split(sys.version)[0]
148148
dst = getextensiondirfile(src+ ' ' + version)
149-
if not os.path.exists(src):
150-
if not os.path.exists(altsrc):
149+
if not os.path.exists(os.path.join(sys.exec_prefix, src)):
150+
if not os.path.exists(os.path.join(sys.exec_prefix, altsrc)):
151151
if verbose: print '*', src, 'not found'
152152
return 0
153153
src = altsrc
154154
try:
155155
os.unlink(dst)
156156
except os.error:
157157
pass
158-
macostools.mkalias(src, dst)
158+
macostools.mkalias(os.path.join(sys.exec_prefix, src), dst)
159159
if verbose: print ' ', dst, '->', src
160160
return 1
161161

0 commit comments

Comments
 (0)