Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add post_install script to create start menu entries in Python 3 #1143

Closed
wants to merge 1 commit into from

2 participants

Thomas Kluyver Min RK
Thomas Kluyver
Owner

This should fix #1119, but I can't test it, because I don't have a Windows machine handy, and Python in Wine seems to be having problems.

Can someone with a Windows machine test it? You'll need Python 3.2 installed. With this branch checked out, run C:\python32\python.exe setup.py bdist_wininst. This will produce a .exe installer - run that, and see if it completes without errors and creates start menu entries for IPython on Python 3.

Min RK
Owner

Thanks, this I understand and am super comfortable with, so I'll do a test in a VM, and merge if it works.

Min RK
Owner

Various few small fixes (print_statement, '3' suffix on files) are required to the script itself, but I've made them locally and this works just fine. I'll merge in a sec.

Min RK minrk referenced this pull request from a commit
Min RK minrk Merge PR #1143 (Python3 StartMenu items)
Start Menu items are now installed with bdist_wininst on Python 3.

closes #1143
5047149
Min RK minrk closed this pull request from a commit
Min RK minrk Merge PR #1143 (Python3 StartMenu items)
Start Menu items are now installed with bdist_wininst on Python 3.

closes #1143
5047149
Min RK minrk closed this in 5047149
Thomas Kluyver
Owner

Thanks, Min.

Brian E. Granger ellisonbg referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
matthew von rocketstein mattvonrocketstein referenced this pull request from a commit in mattvonrocketstein/ipython
Min RK minrk Merge PR #1143 (Python3 StartMenu items)
Start Menu items are now installed with bdist_wininst on Python 3.

closes #1143
3714072
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 0 deletions.
  1. +15 −0 setup3.py
15 setup3.py
View
@@ -1,4 +1,5 @@
import os.path
+import sys
from setuptools import setup
from setuptools.command.build_py import build_py
@@ -14,6 +15,20 @@
setup_args['package_data'] = find_package_data()
setup_args['cmdclass'] = {'build_py': record_commit_info('IPython', build_cmd=build_py)}
+# Script to be run by the windows binary installer after the default setup
+# routine, to add shortcuts and similar windows-only things. Windows
+# post-install scripts MUST reside in the scripts/ dir, otherwise distutils
+# doesn't find them.
+if 'bdist_wininst' in sys.argv:
+ if len(sys.argv) > 2 and \
+ ('sdist' in sys.argv or 'bdist_rpm' in sys.argv):
+ print >> sys.stderr, "ERROR: bdist_wininst must be run alone. Exiting."
+ sys.exit(1)
+ setup_args['scripts'] = [os.path.join('scripts','ipython_win_post_install.py')]
+ setup_args['options'] = {"bdist_wininst":
+ {"install_script":
+ "ipython_win_post_install.py"}}
+
def main():
setup(use_2to3 = True, **setup_args)
Something went wrong with that request. Please try again.