Show More
@@ -29,24 +29,48 b' def exta_imports():' | |||||
29 | # note that this is never run, it's just here for py2exe |
|
29 | # note that this is never run, it's just here for py2exe | |
30 | import distutils.dir_util |
|
30 | import distutils.dir_util | |
31 |
|
31 | |||
|
32 | def kitroot(): | |||
|
33 | return os.environ.get('IPYKITROOT', None) | |||
|
34 | ||||
32 | def main(): |
|
35 | def main(): | |
33 | root = os.environ.get('IPYKITROOT', None) |
|
36 | ||
34 | if not root: |
|
37 | if not kitroot(): | |
35 | print "Can't configure ipykit, IPYKITROOT should be set." |
|
38 | print "Can't configure ipykit, IPYKITROOT should be set." | |
36 | return |
|
39 | return | |
37 |
|
40 | |||
38 | os.environ["PATH"] = os.environ["PATH"] + ";" + root + "\\bin;" |
|
41 | os.environ["PATH"] = os.environ["PATH"] + ";" + kitroot() + "\\bin;" | |
39 | ip.to_user_ns("pylaunchers") |
|
42 | ip.to_user_ns("pylaunchers") | |
|
43 | cmds = ip.db.get('syscmdlist', None) | |||
|
44 | if cmds is None: | |||
|
45 | ip.magic('rehashx') | |||
|
46 | cmds = ip.db.get('syscmdlist', []) | |||
|
47 | #print cmds | |||
|
48 | if 'sc1' in cmds: | |||
|
49 | print "Default editor: Sc1" | |||
|
50 | import ipy_editors | |||
|
51 | ipy_editors.scite('sc1') | |||
|
52 | ||||
|
53 | # for icp, imv, imkdir, etc. | |||
|
54 | import ipy_fsops | |||
|
55 | ||||
|
56 | greeting = """\n\n === Welcome to ipykit === | |||
|
57 | ||||
|
58 | %quickref - learn quickly about IPython. | |||
40 |
|
59 | |||
|
60 | """ | |||
41 |
|
61 | |||
42 | def ipython_firstrun(ip): |
|
62 | def ipython_firstrun(ip): | |
|
63 | ||||
43 | print "First run of ipykit - configuring" |
|
64 | print "First run of ipykit - configuring" | |
|
65 | ||||
44 | ip.defalias('py',selflaunch) |
|
66 | ip.defalias('py',selflaunch) | |
45 |
ip.defalias('d',' |
|
67 | ip.defalias('d','dir /w /og /on') | |
46 | ip.defalias('ls','ls') |
|
|||
47 | ip.magic('store py') |
|
68 | ip.magic('store py') | |
48 | ip.magic('store d') |
|
69 | ip.magic('store d') | |
49 | ip.magic('store ls') |
|
70 | ||
|
71 | bins = kitroot() +'/bin' | |||
|
72 | ||||
|
73 | print greeting | |||
50 |
|
74 | |||
51 | def init_ipython(ipy): |
|
75 | def init_ipython(ipy): | |
52 | global ip |
|
76 | global ip |
@@ -68,7 +68,8 b' setup(name = name,' | |||||
68 | 'pyreadline'], |
|
68 | 'pyreadline'], | |
69 | 'excludes' : ["Tkconstants","Tkinter","tcl",'IPython.igrid','wx', |
|
69 | 'excludes' : ["Tkconstants","Tkinter","tcl",'IPython.igrid','wx', | |
70 | 'wxPython','igrid', 'PyQt4', 'zope', 'Zope', 'Zope2', |
|
70 | 'wxPython','igrid', 'PyQt4', 'zope', 'Zope', 'Zope2', | |
71 |
'_curses','enthought.traits','gtk','qt' |
|
71 | '_curses','enthought.traits','gtk','qt', 'pydb','idlelib', | |
|
72 | ] | |||
72 |
|
73 | |||
73 | } |
|
74 | } | |
74 | }, |
|
75 | }, | |
@@ -91,9 +92,9 b' setup(name = name,' | |||||
91 | minimal_conf = """ |
|
92 | minimal_conf = """ | |
92 | import IPython.ipapi |
|
93 | import IPython.ipapi | |
93 | ip = IPython.ipapi.get() |
|
94 | ip = IPython.ipapi.get() | |
94 | import ipy_profile_sh |
|
|||
95 | ip.load('ipy_kitcfg') |
|
|||
96 |
|
95 | |||
|
96 | ip.load('ipy_kitcfg') | |||
|
97 | import ipy_profile_sh | |||
97 | """ |
|
98 | """ | |
98 |
|
99 | |||
99 | if not os.path.isdir("dist/_ipython"): |
|
100 | if not os.path.isdir("dist/_ipython"): | |
@@ -102,4 +103,4 b' if not os.path.isdir("dist/_ipython"):' | |||||
102 | open("dist/_ipython/ipythonrc.ini","w").write("# intentionally blank\n") |
|
103 | open("dist/_ipython/ipythonrc.ini","w").write("# intentionally blank\n") | |
103 | open("dist/_ipython/ipy_user_conf.py","w").write(minimal_conf) |
|
104 | open("dist/_ipython/ipy_user_conf.py","w").write(minimal_conf) | |
104 | if os.path.isdir('bin'): |
|
105 | if os.path.isdir('bin'): | |
105 |
dir_util.copy_tree('bin','dist/ |
|
106 | dir_util.copy_tree('bin','dist/bin') |
@@ -9,23 +9,31 b' requires py2exe' | |||||
9 |
|
9 | |||
10 | import os |
|
10 | import os | |
11 | import distutils.dir_util |
|
11 | import distutils.dir_util | |
|
12 | import sys | |||
|
13 | ||||
|
14 | execfile('../IPython/Release.py') | |||
|
15 | ||||
12 | def c(cmd): |
|
16 | def c(cmd): | |
13 | print ">",cmd |
|
17 | print ">",cmd | |
14 | os.system(cmd) |
|
18 | os.system(cmd) | |
15 |
|
19 | |||
|
20 | ipykit_name = "ipykit-%s" % version | |||
|
21 | ||||
|
22 | ||||
16 | os.chdir('..') |
|
23 | os.chdir('..') | |
17 | if os.path.isdir('dist'): |
|
24 | if os.path.isdir('dist'): | |
18 | distutils.dir_util.remove_tree('dist') |
|
25 | distutils.dir_util.remove_tree('dist') | |
19 |
if os.path.isdir( |
|
26 | if os.path.isdir(ipykit_name): | |
20 |
distutils.dir_util.remove_tree( |
|
27 | distutils.dir_util.remove_tree(ipykit_name) | |
21 |
|
28 | |||
22 | c("python exesetup.py py2exe") |
|
29 | c("python exesetup.py py2exe") | |
23 | os.rename('dist','ipykit') |
|
|||
24 |
|
30 | |||
25 | c("zip -r ipykit.zip ipykit") |
|
31 | os.rename('dist',ipykit_name) | |
|
32 | ||||
|
33 | c("zip -r %s.zip %s" % (ipykit_name, ipykit_name)) | |||
26 |
|
34 | |||
27 | c("python setup.py bdist_wininst --install-script=ipython_win_post_install.py") |
|
35 | c("python setup.py bdist_wininst --install-script=ipython_win_post_install.py") | |
28 |
|
36 | |||
29 | os.chdir("dist") |
|
37 | os.chdir("dist") | |
30 | c("svn export http://ipython.scipy.org/svn/ipython/ipython/trunk ipython") |
|
38 | #c("svn export http://ipython.scipy.org/svn/ipython/ipython/trunk ipython") | |
31 | c("zip -r ipython_svn.zip ipython") |
|
39 | #c("zip -r ipython_svn.zip ipython") |
General Comments 0
You need to be logged in to leave comments.
Login now