mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-08 08:55:39 +01:00
Use proper path for macos SW
This commit is contained in:
parent
7a9f6cf195
commit
ff5e5f2743
1 changed files with 6 additions and 5 deletions
|
|
@ -19,11 +19,11 @@ def setenv(key, val):
|
||||||
os.environ[key] = os.path.expandvars(val)
|
os.environ[key] = os.path.expandvars(val)
|
||||||
|
|
||||||
|
|
||||||
SWBASE = '/sw'
|
|
||||||
SW = SWBASE + '/sw'
|
|
||||||
|
|
||||||
if ismacos:
|
if ismacos:
|
||||||
|
|
||||||
|
SWBASE = '/Users/Shared/calibre-build/sw'
|
||||||
|
SW = SWBASE + '/sw'
|
||||||
|
|
||||||
def install_env():
|
def install_env():
|
||||||
setenv('SWBASE', SWBASE)
|
setenv('SWBASE', SWBASE)
|
||||||
setenv('SW', SW)
|
setenv('SW', SW)
|
||||||
|
|
@ -37,6 +37,9 @@ def install_env():
|
||||||
setenv('CALIBRE_QT_PREFIX', '$SW/qt')
|
setenv('CALIBRE_QT_PREFIX', '$SW/qt')
|
||||||
else:
|
else:
|
||||||
|
|
||||||
|
SWBASE = '/sw'
|
||||||
|
SW = SWBASE + '/sw'
|
||||||
|
|
||||||
def install_env():
|
def install_env():
|
||||||
setenv('SW', SW)
|
setenv('SW', SW)
|
||||||
setenv('PATH', '$SW/bin:$PATH')
|
setenv('PATH', '$SW/bin:$PATH')
|
||||||
|
|
@ -77,8 +80,6 @@ def download_and_decompress(url, dest, compression=None):
|
||||||
|
|
||||||
def run_python(*args):
|
def run_python(*args):
|
||||||
python = os.path.expandvars('$SW/bin/python')
|
python = os.path.expandvars('$SW/bin/python')
|
||||||
if ismacos:
|
|
||||||
python += '2'
|
|
||||||
if len(args) == 1:
|
if len(args) == 1:
|
||||||
args = shlex.split(args[0])
|
args = shlex.split(args[0])
|
||||||
args = [python] + list(args)
|
args = [python] + list(args)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue