##// END OF EJS Templates
Massive amount of work to improve the test suite, restores doctests....
Massive amount of work to improve the test suite, restores doctests. After Brian's comments, I realized that our test machinery was NOT in reality running all the ipython-syntax doctests we have. This is now fixed. The test suite isn't completely passing, but this commit is for the underlying machinery. I will now work on fixing as many broken tests as I can. Fixes https://bugs.launchpad.net/ipython/+bug/505071

File last commit:

r2156:ed44a843 merge
r2414:7fce7ae8
Show More
ipython_win_post_install.py
98 lines | 3.0 KiB | text/x-python | PythonLexer
/ scripts / ipython_win_post_install.py
Ville M. Vainio
crlf -> lf
r1032 #!python
"""Windows-specific part of the installation"""
import os, sys, shutil
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611 pjoin = os.path.join
Ville M. Vainio
crlf -> lf
r1032
def mkshortcut(target,description,link_file,*args,**kw):
"""make a shortcut if it doesn't exist, and register its creation"""
create_shortcut(target, description, link_file,*args,**kw)
file_created(link_file)
def install():
"""Routine to be run by the win32 installer with the -install switch."""
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611
Brian Granger
Fixing a few bugs to get the win32 installer working again.
r2060 from IPython.core.release import version
Ville M. Vainio
crlf -> lf
r1032
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611 # Get some system constants
prefix = sys.prefix
python = pjoin(prefix, 'python.exe')
# Lookup path to common startmenu ...
ip_start_menu = pjoin(get_special_folder_path('CSIDL_COMMON_PROGRAMS'), 'IPython')
Ville M. Vainio
crlf -> lf
r1032 # Create IPython entry ...
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611 if not os.path.isdir(ip_start_menu):
os.mkdir(ip_start_menu)
directory_created(ip_start_menu)
# Create .py and .bat files to make things available from
Brian Granger
Added test in ipcluster.py to see if the platform is win32. If so,...
r1613 # the Windows command line. Thanks to the Twisted project
# for this logic!
Brian Granger
Completely fixed the ipython_win_post_install.py script. It now ...
r1612 programs = [
'ipython',
'iptest',
'ipcontroller',
'ipengine',
'ipcluster',
'ipythonx',
'ipython-wx',
'irunner'
]
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611 scripts = pjoin(prefix,'scripts')
Brian Granger
Completely fixed the ipython_win_post_install.py script. It now ...
r1612 for program in programs:
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611 raw = pjoin(scripts, program)
bat = raw + '.bat'
py = raw + '.py'
# Create .py versions of the scripts
shutil.copy(raw, py)
# Create .bat files for each of the scripts
bat_file = file(bat,'w')
bat_file.write("@%s %s %%*" % (python, py))
bat_file.close()
Brian Granger
Completely fixed the ipython_win_post_install.py script. It now ...
r1612
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611 # Now move onto setting the Start Menu up
Brian Granger
Completely fixed the ipython_win_post_install.py script. It now ...
r1612 ipybase = pjoin(scripts, 'ipython')
Ville M. Vainio
crlf -> lf
r1032
Brian Granger
Completely fixed the ipython_win_post_install.py script. It now ...
r1612 link = pjoin(ip_start_menu, 'IPython.lnk')
cmd = '"%s"' % ipybase
mkshortcut(python,'IPython',link,cmd)
link = pjoin(ip_start_menu, 'pysh.lnk')
cmd = '"%s" -p sh' % ipybase
mkshortcut(python,'IPython (command prompt mode)',link,cmd)
link = pjoin(ip_start_menu, 'scipy.lnk')
Brian Granger
Removing various references to the threaded shells and -pylab....
r2072 cmd = '"%s" -p scipy' % ipybase
Brian Granger
Completely fixed the ipython_win_post_install.py script. It now ...
r1612 mkshortcut(python,'IPython (scipy profile)',link,cmd)
Fernando Perez
Remove test suite from win32 start menu....
r2114
Brian Granger
Completely fixed the ipython_win_post_install.py script. It now ...
r1612 link = pjoin(ip_start_menu, 'ipcontroller.lnk')
cmd = '"%s" -xy' % pjoin(scripts, 'ipcontroller')
mkshortcut(python,'IPython controller',link,cmd)
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611
Brian Granger
Completely fixed the ipython_win_post_install.py script. It now ...
r1612 link = pjoin(ip_start_menu, 'ipengine.lnk')
cmd = '"%s"' % pjoin(scripts, 'ipengine')
mkshortcut(python,'IPython engine',link,cmd)
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611
Fernando Perez
Fix problem with windows installer script: html docs were not found.
r1589 # Create documentation shortcuts ...
vivainio2
win postinstall script manual location (start menu shortcut)
r1194 t = prefix + r'\share\doc\ipython\manual\ipython.pdf'
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611 f = ip_start_menu + r'\Manual in PDF.lnk'
Ville M. Vainio
crlf -> lf
r1032 mkshortcut(t,r'IPython Manual - PDF-Format',f)
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611
Fernando Perez
Fix problem with windows installer script: html docs were not found.
r1589 t = prefix + r'\share\doc\ipython\manual\html\index.html'
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611 f = ip_start_menu + r'\Manual in HTML.lnk'
Ville M. Vainio
crlf -> lf
r1032 mkshortcut(t,'IPython Manual - HTML-Format',f)
Brian Granger
Tried to fix the windows post install script. It now creates...
r1611
Ville M. Vainio
crlf -> lf
r1032
def remove():
"""Routine to be run by the win32 installer with the -remove switch."""
pass
# main()
if len(sys.argv) > 1:
if sys.argv[1] == '-install':
install()
elif sys.argv[1] == '-remove':
remove()
else:
print "Script was called with option %s" % sys.argv[1]