mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-13 10:42:17 -04:00
Move creation of pycygrun into the install script
This commit is contained in:
@@ -9,6 +9,7 @@ import re
|
||||
import shutil
|
||||
import os
|
||||
import glob
|
||||
import stat
|
||||
|
||||
known_extensions = {
|
||||
'bz2.pyd',
|
||||
@@ -128,6 +129,16 @@ def main():
|
||||
if num != 1:
|
||||
raise SystemExit('Failed to patch mimetypes.py')
|
||||
f.write(raw)
|
||||
pycgrun = os.path.join(install_dir, 'pycygrun')
|
||||
with open(pycgrun, 'wb') as f:
|
||||
f.write(b'''\
|
||||
#!/bin/zsh
|
||||
SCRIPT=$(readlink -f $0)
|
||||
SCRIPTPATH=`dirname $SCRIPT`
|
||||
PYSCRIPT=`cygpath -w $1`
|
||||
exec $SCRIPTPATH/python.exe $PYSCRIPT ${@:2}
|
||||
''')
|
||||
os.chmod(pycgrun, stat.S_IRWXU)
|
||||
|
||||
print('python installed to:', install_dir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user