From fd9539008a221d475d4d74a98444605ada818fa6 2010-11-03 06:44:04 From: Fernando Perez Date: 2010-11-03 06:44:04 Subject: [PATCH] Merge branch 'windows-workdir' of http://github.com/darrendale/ipython into darrendale-windows-workdir --- diff --git a/scripts/ipython_win_post_install.py b/scripts/ipython_win_post_install.py index 606fd7f..4f633fc 100755 --- a/scripts/ipython_win_post_install.py +++ b/scripts/ipython_win_post_install.py @@ -51,26 +51,30 @@ def install(): # Now move onto setting the Start Menu up ipybase = pjoin(scripts, 'ipython') + if 'setuptools' in sys.modules: + # let setuptools take care of the scripts: + ipybase = ipybase + '-script.py' + workdir = "%HOMEDRIVE%%HOMEPATH%" link = pjoin(ip_start_menu, 'IPython.lnk') cmd = '"%s"' % ipybase - mkshortcut(python,'IPython',link,cmd) + mkshortcut(python, 'IPython', link, cmd, workdir) link = pjoin(ip_start_menu, 'pysh.lnk') cmd = '"%s" -p sh' % ipybase - mkshortcut(python,'IPython (command prompt mode)',link,cmd) + mkshortcut(python, 'IPython (command prompt mode)', link, cmd, workdir) link = pjoin(ip_start_menu, 'scipy.lnk') cmd = '"%s" -p scipy' % ipybase - mkshortcut(python,'IPython (scipy profile)',link,cmd) + mkshortcut(python, 'IPython (scipy profile)', link, cmd, workdir) link = pjoin(ip_start_menu, 'ipcontroller.lnk') cmd = '"%s" -xy' % pjoin(scripts, 'ipcontroller') - mkshortcut(python,'IPython controller',link,cmd) + mkshortcut(python, 'IPython controller', link, cmd, workdir) link = pjoin(ip_start_menu, 'ipengine.lnk') cmd = '"%s"' % pjoin(scripts, 'ipengine') - mkshortcut(python,'IPython engine',link,cmd) + mkshortcut(python, 'IPython engine', link, cmd, workdir) # Create documentation shortcuts ... t = prefix + r'\share\doc\ipython\manual\ipython.pdf' diff --git a/setup.py b/setup.py index e4d8e4f..1f4b7db 100755 --- a/setup.py +++ b/setup.py @@ -232,8 +232,6 @@ if 'setuptools' in sys.modules: test='nose>=0.10.1', security='pyOpenSSL>=0.6' ) - # Allow setuptools to handle the scripts - scripts = [] else: # If we are running without setuptools, call this function which will # check for dependencies an inform the user what is needed. This is diff --git a/setupbase.py b/setupbase.py index 37571a5..835e87a 100644 --- a/setupbase.py +++ b/setupbase.py @@ -278,7 +278,7 @@ def find_scripts(): file=sys.stderr) sys.exit(1) scripts.append(pjoin('scripts','ipython_win_post_install.py')) - + return scripts #---------------------------------------------------------------------------