##// END OF EJS Templates
ipykit improvements (built in Sc1 setup etc.)
vivainio -
Show More
@@ -29,25 +29,49 b' def exta_imports():'
29 29 # note that this is never run, it's just here for py2exe
30 30 import distutils.dir_util
31 31
32 def kitroot():
33 return os.environ.get('IPYKITROOT', None)
34
32 35 def main():
33 root = os.environ.get('IPYKITROOT', None)
34 if not root:
36
37 if not kitroot():
35 38 print "Can't configure ipykit, IPYKITROOT should be set."
36 39 return
37
38 os.environ["PATH"] = os.environ["PATH"] + ";" + root + "\\bin;"
40
41 os.environ["PATH"] = os.environ["PATH"] + ";" + kitroot() + "\\bin;"
39 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')
40 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.
59
60 """
41 61
42 62 def ipython_firstrun(ip):
63
43 64 print "First run of ipykit - configuring"
65
44 66 ip.defalias('py',selflaunch)
45 ip.defalias('d','ls -F')
46 ip.defalias('ls','ls')
67 ip.defalias('d','dir /w /og /on')
47 68 ip.magic('store py')
48 69 ip.magic('store d')
49 ip.magic('store ls')
70
71 bins = kitroot() +'/bin'
50 72
73 print greeting
74
51 75 def init_ipython(ipy):
52 76 global ip
53 77 ip = ipy
@@ -68,7 +68,8 b' setup(name = name,'
68 68 'pyreadline'],
69 69 'excludes' : ["Tkconstants","Tkinter","tcl",'IPython.igrid','wx',
70 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 92 minimal_conf = """
92 93 import IPython.ipapi
93 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 100 if not os.path.isdir("dist/_ipython"):
@@ -102,4 +103,4 b' if not os.path.isdir("dist/_ipython"):'
102 103 open("dist/_ipython/ipythonrc.ini","w").write("# intentionally blank\n")
103 104 open("dist/_ipython/ipy_user_conf.py","w").write(minimal_conf)
104 105 if os.path.isdir('bin'):
105 dir_util.copy_tree('bin','dist/_ipython/bin')
106 dir_util.copy_tree('bin','dist/bin')
@@ -9,23 +9,31 b' requires py2exe'
9 9
10 10 import os
11 11 import distutils.dir_util
12 import sys
13
14 execfile('../IPython/Release.py')
15
12 16 def c(cmd):
13 17 print ">",cmd
14 18 os.system(cmd)
15 19
20 ipykit_name = "ipykit-%s" % version
21
22
16 23 os.chdir('..')
17 24 if os.path.isdir('dist'):
18 25 distutils.dir_util.remove_tree('dist')
19 if os.path.isdir('ipykit'):
20 distutils.dir_util.remove_tree('ipykit')
26 if os.path.isdir(ipykit_name):
27 distutils.dir_util.remove_tree(ipykit_name)
21 28
22 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 35 c("python setup.py bdist_wininst --install-script=ipython_win_post_install.py")
28 36
29 37 os.chdir("dist")
30 c("svn export http://ipython.scipy.org/svn/ipython/ipython/trunk ipython")
31 c("zip -r ipython_svn.zip ipython")
38 #c("svn export http://ipython.scipy.org/svn/ipython/ipython/trunk ipython")
39 #c("zip -r ipython_svn.zip ipython")
General Comments 0
You need to be logged in to leave comments. Login now