Use proper path for macos SW

This commit is contained in:
Kovid Goyal 2019-09-05 13:46:11 +05:30
parent 7a9f6cf195
commit ff5e5f2743
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -19,11 +19,11 @@ def setenv(key, val):
os.environ[key] = os.path.expandvars(val)
SWBASE = '/sw'
SW = SWBASE + '/sw'
if ismacos:
SWBASE = '/Users/Shared/calibre-build/sw'
SW = SWBASE + '/sw'
def install_env():
setenv('SWBASE', SWBASE)
setenv('SW', SW)
@ -37,6 +37,9 @@ if ismacos:
setenv('CALIBRE_QT_PREFIX', '$SW/qt')
else:
SWBASE = '/sw'
SW = SWBASE + '/sw'
def install_env():
setenv('SW', SW)
setenv('PATH', '$SW/bin:$PATH')
@ -77,8 +80,6 @@ def download_and_decompress(url, dest, compression=None):
def run_python(*args):
python = os.path.expandvars('$SW/bin/python')
if ismacos:
python += '2'
if len(args) == 1:
args = shlex.split(args[0])
args = [python] + list(args)