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

Skip to content

Commit 0e08d16

Browse files
committed
Merge pull request #284 from stonebig/master
cleanups
2 parents c8e7580 + 3e7854d commit 0e08d16

File tree

2 files changed

+13
-38
lines changed

2 files changed

+13
-38
lines changed

make.py

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,6 @@ def get_tool_path(relpath, checkfunc):
144144
if get_tool_path (r'\tools\SciTE.exe', osp.isfile):
145145
installed_tools += [('SciTE', '3.3.7')]
146146

147-
gccpath = get_tool_path(self.MINGW32_PATH, osp.isdir)
148-
if gccpath is not None:
149-
gccver = utils.get_gcc_version(gccpath)
150-
installed_tools += [('MinGW32', gccver)]
151-
152147
rpath = get_tool_path(self.R_PATH, osp.isdir)
153148
if rpath is not None:
154149
rver = utils.get_r_version(rpath)
@@ -308,7 +303,7 @@ def create_batch_script(self, name, contents):
308303
fd.close()
309304

310305
def create_launcher(self, name, icon, command=None,
311-
args=None, workdir=None,
306+
args=None, workdir=r'$EXEDIR\scripts',
312307
launcher='launcher_basic.nsi'):
313308
"""Create exe launcher with NSIS"""
314309
assert name.endswith('.exe')
@@ -495,70 +490,58 @@ def _create_launchers(self):
495490
self._print("Creating launchers")
496491
self.create_launcher('WinPython Command Prompt.exe', 'cmd.ico',
497492
command='$SYSDIR\cmd.exe',
498-
args=r'/k cmd.bat',
499-
workdir='$EXEDIR\scripts')
493+
args=r'/k cmd.bat')
500494

501495
self.create_launcher('WinPython Interpreter.exe', 'python.ico',
502496
command='$SYSDIR\cmd.exe',
503-
args= r'/k python.bat',
504-
workdir='$EXEDIR\scripts')
497+
args= r'/k python.bat')
505498

506499
#self.create_launcher('IDLEX (students).exe', 'python.ico',
507500
# command='$SYSDIR\cmd.exe',
508501
# args= r'/k IDLEX_for_student.bat %*',
509502
# workdir='$EXEDIR\scripts')
510503
self.create_launcher('IDLEX (Python GUI).exe', 'python.ico',
511504
command='wscript.exe',
512-
args= r'Noshell.vbs IDLEX.bat',
513-
workdir='$EXEDIR\scripts')
505+
args= r'Noshell.vbs IDLEX.bat')
514506

515507
self.create_launcher('Spyder.exe', 'spyder.ico',
516508
command='wscript.exe',
517-
args=r'Noshell.vbs spyder.bat',
518-
workdir='$EXEDIR\Scripts')
509+
args=r'Noshell.vbs spyder.bat')
519510

520511
self.create_launcher('Spyder reset.exe', 'spyder_reset.ico',
521512
command='wscript.exe',
522-
args=r'Noshell.vbs spyder_reset.bat',
523-
workdir='$EXEDIR\Scripts')
513+
args=r'Noshell.vbs spyder_reset.bat')
524514

525515
self.create_launcher('WinPython Control Panel.exe', 'winpython.ico',
526516
command='wscript.exe',
527-
args=r'Noshell.vbs wpcp.bat',
528-
workdir='$EXEDIR\Scripts')
517+
args=r'Noshell.vbs wpcp.bat')
529518

530519
# Multi-Qt launchers (Qt5 has priority if found)
531520
self.create_launcher('Qt Demo.exe', 'qt.ico',
532521
command='wscript.exe',
533-
args=r'Noshell.vbs qtdemo.bat',
534-
workdir='$EXEDIR\Scripts')
522+
args=r'Noshell.vbs qtdemo.bat')
535523

536524
self.create_launcher('Qt Assistant.exe', 'qtassistant.ico',
537525
command='wscript.exe',
538-
args=r'Noshell.vbs qtassistant.bat',
539-
workdir='$EXEDIR\Scripts')
526+
args=r'Noshell.vbs qtassistant.bat')
540527

541528
self.create_launcher('Qt Designer.exe', 'qtdesigner.ico',
542529
command='wscript.exe',
543-
args=r'Noshell.vbs qtdesigner.bat',
544-
workdir='$EXEDIR\Scripts')
530+
args=r'Noshell.vbs qtdesigner.bat')
545531

546532
self.create_launcher('Qt Linguist.exe', 'qtlinguist.ico',
547533
command='wscript.exe',
548-
args=r'Noshell.vbs qtlinguist.bat',
549-
workdir='$EXEDIR\Scripts')
534+
args=r'Noshell.vbs qtlinguist.bat')
550535

551536
# Jupyter launchers
552537
self.create_launcher('IPython Qt Console.exe', 'ipython.ico',
553538
command='wscript.exe',
554-
args=r'Noshell.vbs qtconsole.bat',
555-
workdir='$EXEDIR\Scripts')
539+
args=r'Noshell.vbs qtconsole.bat')
556540

557541
# this one needs a shell to kill fantom processes
558542
self.create_launcher('Jupyter Notebook.exe', 'jupyter.ico',
559543
command='$SYSDIR\cmd.exe',
560-
args=r'/k ipython_notebook.bat',
561-
workdir='$EXEDIR\Scripts')
544+
args=r'/k ipython_notebook.bat')
562545

563546
self._print_done()
564547

winpython/utils.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,6 @@ def exec_shell_cmd(args, path):
232232
return decode_fs_string(process.stdout.read())
233233

234234

235-
def get_gcc_version(path):
236-
"""Return version of the GCC compiler installed in *path*"""
237-
return exec_shell_cmd('gcc --version', path).splitlines()[0].split()[-1]
238-
239-
240235
def get_r_version(path):
241236
"""Return version of the R installed in *path*"""
242237
return exec_shell_cmd('dir ..\README.R*', path).splitlines()[-3].split("-")[-1]
@@ -611,9 +606,6 @@ def do_script(this_script, python_exe=None, copy_to=None,
611606

612607

613608
if __name__ == '__main__':
614-
gcc = get_gcc_version(osp.join(BASE_DIR, 'tools.win32', 'mingw32', 'bin'))
615-
print(("gcc version: %r" % gcc))
616-
617609
thg = get_thg_version(osp.join(BASE_DIR, 'tools', 'tortoisehg'))
618610
print(("thg version: %r" % thg))
619611

0 commit comments

Comments
 (0)