Show More
@@ -1,97 +1,100 b'' | |||||
1 | #!python |
|
1 | #!python | |
2 | """Windows-specific part of the installation""" |
|
2 | """Windows-specific part of the installation""" | |
3 |
|
3 | |||
4 | import os, sys, shutil |
|
4 | import os, sys, shutil | |
5 | pjoin = os.path.join |
|
5 | pjoin = os.path.join | |
6 |
|
6 | |||
7 | def mkshortcut(target,description,link_file,*args,**kw): |
|
7 | def mkshortcut(target,description,link_file,*args,**kw): | |
8 | """make a shortcut if it doesn't exist, and register its creation""" |
|
8 | """make a shortcut if it doesn't exist, and register its creation""" | |
9 |
|
9 | |||
10 | create_shortcut(target, description, link_file,*args,**kw) |
|
10 | create_shortcut(target, description, link_file,*args,**kw) | |
11 | file_created(link_file) |
|
11 | file_created(link_file) | |
12 |
|
12 | |||
13 | def install(): |
|
13 | def install(): | |
14 | """Routine to be run by the win32 installer with the -install switch.""" |
|
14 | """Routine to be run by the win32 installer with the -install switch.""" | |
15 |
|
15 | |||
16 | from IPython.core.release import version |
|
16 | from IPython.core.release import version | |
17 |
|
17 | |||
18 | # Get some system constants |
|
18 | # Get some system constants | |
19 | prefix = sys.prefix |
|
19 | prefix = sys.prefix | |
20 | python = pjoin(prefix, 'python.exe') |
|
20 | python = pjoin(prefix, 'python.exe') | |
21 |
|
21 | |||
22 | # Lookup path to common startmenu ... |
|
22 | # Lookup path to common startmenu ... | |
23 | ip_start_menu = pjoin(get_special_folder_path('CSIDL_COMMON_PROGRAMS'), 'IPython') |
|
23 | ip_start_menu = pjoin(get_special_folder_path('CSIDL_COMMON_PROGRAMS'), 'IPython') | |
24 | # Create IPython entry ... |
|
24 | # Create IPython entry ... | |
25 | if not os.path.isdir(ip_start_menu): |
|
25 | if not os.path.isdir(ip_start_menu): | |
26 | os.mkdir(ip_start_menu) |
|
26 | os.mkdir(ip_start_menu) | |
27 | directory_created(ip_start_menu) |
|
27 | directory_created(ip_start_menu) | |
28 |
|
28 | |||
29 | # Create .py and .bat files to make things available from |
|
29 | # Create .py and .bat files to make things available from | |
30 | # the Windows command line. Thanks to the Twisted project |
|
30 | # the Windows command line. Thanks to the Twisted project | |
31 | # for this logic! |
|
31 | # for this logic! | |
32 | programs = [ |
|
32 | programs = [ | |
33 | 'ipython', |
|
33 | 'ipython', | |
34 | 'iptest', |
|
34 | 'iptest', | |
35 | 'ipcontroller', |
|
35 | 'ipcontroller', | |
36 | 'ipengine', |
|
36 | 'ipengine', | |
37 | 'ipcluster', |
|
37 | 'ipcluster', | |
38 | 'irunner' |
|
38 | 'irunner' | |
39 | ] |
|
39 | ] | |
40 | scripts = pjoin(prefix,'scripts') |
|
40 | scripts = pjoin(prefix,'scripts') | |
41 | for program in programs: |
|
41 | for program in programs: | |
42 | raw = pjoin(scripts, program) |
|
42 | raw = pjoin(scripts, program) | |
43 | bat = raw + '.bat' |
|
43 | bat = raw + '.bat' | |
44 | py = raw + '.py' |
|
44 | py = raw + '.py' | |
45 | # Create .py versions of the scripts |
|
45 | # Create .py versions of the scripts | |
46 | shutil.copy(raw, py) |
|
46 | shutil.copy(raw, py) | |
47 | # Create .bat files for each of the scripts |
|
47 | # Create .bat files for each of the scripts | |
48 | bat_file = file(bat,'w') |
|
48 | bat_file = file(bat,'w') | |
49 | bat_file.write("@%s %s %%*" % (python, py)) |
|
49 | bat_file.write("@%s %s %%*" % (python, py)) | |
50 | bat_file.close() |
|
50 | bat_file.close() | |
51 |
|
51 | |||
52 | # Now move onto setting the Start Menu up |
|
52 | # Now move onto setting the Start Menu up | |
53 | ipybase = pjoin(scripts, 'ipython') |
|
53 | ipybase = pjoin(scripts, 'ipython') | |
|
54 | if 'setuptools' in sys.modules: | |||
|
55 | # let setuptools take care of the scripts: | |||
|
56 | ipybase = ipybase + '-script.py' | |||
54 | workdir = "%HOMEDRIVE%%HOMEPATH%" |
|
57 | workdir = "%HOMEDRIVE%%HOMEPATH%" | |
55 |
|
58 | |||
56 | link = pjoin(ip_start_menu, 'IPython.lnk') |
|
59 | link = pjoin(ip_start_menu, 'IPython.lnk') | |
57 | cmd = '"%s"' % ipybase |
|
60 | cmd = '"%s"' % ipybase | |
58 | mkshortcut(python, 'IPython', link, cmd, workdir) |
|
61 | mkshortcut(python, 'IPython', link, cmd, workdir) | |
59 |
|
62 | |||
60 | link = pjoin(ip_start_menu, 'pysh.lnk') |
|
63 | link = pjoin(ip_start_menu, 'pysh.lnk') | |
61 | cmd = '"%s" -p sh' % ipybase |
|
64 | cmd = '"%s" -p sh' % ipybase | |
62 | mkshortcut(python, 'IPython (command prompt mode)', link, cmd, workdir) |
|
65 | mkshortcut(python, 'IPython (command prompt mode)', link, cmd, workdir) | |
63 |
|
66 | |||
64 | link = pjoin(ip_start_menu, 'scipy.lnk') |
|
67 | link = pjoin(ip_start_menu, 'scipy.lnk') | |
65 | cmd = '"%s" -p scipy' % ipybase |
|
68 | cmd = '"%s" -p scipy' % ipybase | |
66 | mkshortcut(python, 'IPython (scipy profile)', link, cmd, workdir) |
|
69 | mkshortcut(python, 'IPython (scipy profile)', link, cmd, workdir) | |
67 |
|
70 | |||
68 | link = pjoin(ip_start_menu, 'ipcontroller.lnk') |
|
71 | link = pjoin(ip_start_menu, 'ipcontroller.lnk') | |
69 | cmd = '"%s" -xy' % pjoin(scripts, 'ipcontroller') |
|
72 | cmd = '"%s" -xy' % pjoin(scripts, 'ipcontroller') | |
70 | mkshortcut(python, 'IPython controller', link, cmd, workdir) |
|
73 | mkshortcut(python, 'IPython controller', link, cmd, workdir) | |
71 |
|
74 | |||
72 | link = pjoin(ip_start_menu, 'ipengine.lnk') |
|
75 | link = pjoin(ip_start_menu, 'ipengine.lnk') | |
73 | cmd = '"%s"' % pjoin(scripts, 'ipengine') |
|
76 | cmd = '"%s"' % pjoin(scripts, 'ipengine') | |
74 | mkshortcut(python, 'IPython engine', link, cmd, workdir) |
|
77 | mkshortcut(python, 'IPython engine', link, cmd, workdir) | |
75 |
|
78 | |||
76 | # Create documentation shortcuts ... |
|
79 | # Create documentation shortcuts ... | |
77 | t = prefix + r'\share\doc\ipython\manual\ipython.pdf' |
|
80 | t = prefix + r'\share\doc\ipython\manual\ipython.pdf' | |
78 | f = ip_start_menu + r'\Manual in PDF.lnk' |
|
81 | f = ip_start_menu + r'\Manual in PDF.lnk' | |
79 | mkshortcut(t,r'IPython Manual - PDF-Format',f) |
|
82 | mkshortcut(t,r'IPython Manual - PDF-Format',f) | |
80 |
|
83 | |||
81 | t = prefix + r'\share\doc\ipython\manual\html\index.html' |
|
84 | t = prefix + r'\share\doc\ipython\manual\html\index.html' | |
82 | f = ip_start_menu + r'\Manual in HTML.lnk' |
|
85 | f = ip_start_menu + r'\Manual in HTML.lnk' | |
83 | mkshortcut(t,'IPython Manual - HTML-Format',f) |
|
86 | mkshortcut(t,'IPython Manual - HTML-Format',f) | |
84 |
|
87 | |||
85 |
|
88 | |||
86 | def remove(): |
|
89 | def remove(): | |
87 | """Routine to be run by the win32 installer with the -remove switch.""" |
|
90 | """Routine to be run by the win32 installer with the -remove switch.""" | |
88 | pass |
|
91 | pass | |
89 |
|
92 | |||
90 | # main() |
|
93 | # main() | |
91 | if len(sys.argv) > 1: |
|
94 | if len(sys.argv) > 1: | |
92 | if sys.argv[1] == '-install': |
|
95 | if sys.argv[1] == '-install': | |
93 | install() |
|
96 | install() | |
94 | elif sys.argv[1] == '-remove': |
|
97 | elif sys.argv[1] == '-remove': | |
95 | remove() |
|
98 | remove() | |
96 | else: |
|
99 | else: | |
97 | print "Script was called with option %s" % sys.argv[1] |
|
100 | print "Script was called with option %s" % sys.argv[1] |
@@ -1,257 +1,255 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | # -*- coding: utf-8 -*- |
|
2 | # -*- coding: utf-8 -*- | |
3 | """Setup script for IPython. |
|
3 | """Setup script for IPython. | |
4 |
|
4 | |||
5 | Under Posix environments it works like a typical setup.py script. |
|
5 | Under Posix environments it works like a typical setup.py script. | |
6 | Under Windows, the command sdist is not supported, since IPython |
|
6 | Under Windows, the command sdist is not supported, since IPython | |
7 | requires utilities which are not available under Windows.""" |
|
7 | requires utilities which are not available under Windows.""" | |
8 |
|
8 | |||
9 | #----------------------------------------------------------------------------- |
|
9 | #----------------------------------------------------------------------------- | |
10 | # Copyright (c) 2008-2010, IPython Development Team. |
|
10 | # Copyright (c) 2008-2010, IPython Development Team. | |
11 | # Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu> |
|
11 | # Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu> | |
12 | # Copyright (c) 2001, Janko Hauser <jhauser@zscout.de> |
|
12 | # Copyright (c) 2001, Janko Hauser <jhauser@zscout.de> | |
13 | # Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu> |
|
13 | # Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu> | |
14 | # |
|
14 | # | |
15 | # Distributed under the terms of the Modified BSD License. |
|
15 | # Distributed under the terms of the Modified BSD License. | |
16 | # |
|
16 | # | |
17 | # The full license is in the file COPYING.txt, distributed with this software. |
|
17 | # The full license is in the file COPYING.txt, distributed with this software. | |
18 | #----------------------------------------------------------------------------- |
|
18 | #----------------------------------------------------------------------------- | |
19 |
|
19 | |||
20 | #----------------------------------------------------------------------------- |
|
20 | #----------------------------------------------------------------------------- | |
21 | # Minimal Python version sanity check |
|
21 | # Minimal Python version sanity check | |
22 | #----------------------------------------------------------------------------- |
|
22 | #----------------------------------------------------------------------------- | |
23 |
|
23 | |||
24 | import sys |
|
24 | import sys | |
25 |
|
25 | |||
26 | # This check is also made in IPython/__init__, don't forget to update both when |
|
26 | # This check is also made in IPython/__init__, don't forget to update both when | |
27 | # changing Python version requirements. |
|
27 | # changing Python version requirements. | |
28 | if sys.version[0:3] < '2.6': |
|
28 | if sys.version[0:3] < '2.6': | |
29 | error = """\ |
|
29 | error = """\ | |
30 | ERROR: 'IPython requires Python Version 2.6 or above.' |
|
30 | ERROR: 'IPython requires Python Version 2.6 or above.' | |
31 | Exiting.""" |
|
31 | Exiting.""" | |
32 | print >> sys.stderr, error |
|
32 | print >> sys.stderr, error | |
33 | sys.exit(1) |
|
33 | sys.exit(1) | |
34 |
|
34 | |||
35 | # At least we're on the python version we need, move on. |
|
35 | # At least we're on the python version we need, move on. | |
36 |
|
36 | |||
37 | #------------------------------------------------------------------------------- |
|
37 | #------------------------------------------------------------------------------- | |
38 | # Imports |
|
38 | # Imports | |
39 | #------------------------------------------------------------------------------- |
|
39 | #------------------------------------------------------------------------------- | |
40 |
|
40 | |||
41 | # Stdlib imports |
|
41 | # Stdlib imports | |
42 | import os |
|
42 | import os | |
43 | import shutil |
|
43 | import shutil | |
44 |
|
44 | |||
45 | from glob import glob |
|
45 | from glob import glob | |
46 |
|
46 | |||
47 | # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly |
|
47 | # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly | |
48 | # update it when the contents of directories change. |
|
48 | # update it when the contents of directories change. | |
49 | if os.path.exists('MANIFEST'): os.remove('MANIFEST') |
|
49 | if os.path.exists('MANIFEST'): os.remove('MANIFEST') | |
50 |
|
50 | |||
51 | from distutils.core import setup |
|
51 | from distutils.core import setup | |
52 |
|
52 | |||
53 | # Our own imports |
|
53 | # Our own imports | |
54 | from IPython.utils.path import target_update |
|
54 | from IPython.utils.path import target_update | |
55 |
|
55 | |||
56 | from setupbase import ( |
|
56 | from setupbase import ( | |
57 | setup_args, |
|
57 | setup_args, | |
58 | find_packages, |
|
58 | find_packages, | |
59 | find_package_data, |
|
59 | find_package_data, | |
60 | find_scripts, |
|
60 | find_scripts, | |
61 | find_data_files, |
|
61 | find_data_files, | |
62 | check_for_dependencies, |
|
62 | check_for_dependencies, | |
63 | record_commit_info, |
|
63 | record_commit_info, | |
64 | ) |
|
64 | ) | |
65 |
|
65 | |||
66 | isfile = os.path.isfile |
|
66 | isfile = os.path.isfile | |
67 | pjoin = os.path.join |
|
67 | pjoin = os.path.join | |
68 |
|
68 | |||
69 | #----------------------------------------------------------------------------- |
|
69 | #----------------------------------------------------------------------------- | |
70 | # Function definitions |
|
70 | # Function definitions | |
71 | #----------------------------------------------------------------------------- |
|
71 | #----------------------------------------------------------------------------- | |
72 |
|
72 | |||
73 | def cleanup(): |
|
73 | def cleanup(): | |
74 | """Clean up the junk left around by the build process""" |
|
74 | """Clean up the junk left around by the build process""" | |
75 | if "develop" not in sys.argv: |
|
75 | if "develop" not in sys.argv: | |
76 | try: |
|
76 | try: | |
77 | shutil.rmtree('ipython.egg-info') |
|
77 | shutil.rmtree('ipython.egg-info') | |
78 | except: |
|
78 | except: | |
79 | try: |
|
79 | try: | |
80 | os.unlink('ipython.egg-info') |
|
80 | os.unlink('ipython.egg-info') | |
81 | except: |
|
81 | except: | |
82 | pass |
|
82 | pass | |
83 |
|
83 | |||
84 | #------------------------------------------------------------------------------- |
|
84 | #------------------------------------------------------------------------------- | |
85 | # Handle OS specific things |
|
85 | # Handle OS specific things | |
86 | #------------------------------------------------------------------------------- |
|
86 | #------------------------------------------------------------------------------- | |
87 |
|
87 | |||
88 | if os.name == 'posix': |
|
88 | if os.name == 'posix': | |
89 | os_name = 'posix' |
|
89 | os_name = 'posix' | |
90 | elif os.name in ['nt','dos']: |
|
90 | elif os.name in ['nt','dos']: | |
91 | os_name = 'windows' |
|
91 | os_name = 'windows' | |
92 | else: |
|
92 | else: | |
93 | print 'Unsupported operating system:',os.name |
|
93 | print 'Unsupported operating system:',os.name | |
94 | sys.exit(1) |
|
94 | sys.exit(1) | |
95 |
|
95 | |||
96 | # Under Windows, 'sdist' has not been supported. Now that the docs build with |
|
96 | # Under Windows, 'sdist' has not been supported. Now that the docs build with | |
97 | # Sphinx it might work, but let's not turn it on until someone confirms that it |
|
97 | # Sphinx it might work, but let's not turn it on until someone confirms that it | |
98 | # actually works. |
|
98 | # actually works. | |
99 | if os_name == 'windows' and 'sdist' in sys.argv: |
|
99 | if os_name == 'windows' and 'sdist' in sys.argv: | |
100 | print 'The sdist command is not available under Windows. Exiting.' |
|
100 | print 'The sdist command is not available under Windows. Exiting.' | |
101 | sys.exit(1) |
|
101 | sys.exit(1) | |
102 |
|
102 | |||
103 | #------------------------------------------------------------------------------- |
|
103 | #------------------------------------------------------------------------------- | |
104 | # Things related to the IPython documentation |
|
104 | # Things related to the IPython documentation | |
105 | #------------------------------------------------------------------------------- |
|
105 | #------------------------------------------------------------------------------- | |
106 |
|
106 | |||
107 | # update the manuals when building a source dist |
|
107 | # update the manuals when building a source dist | |
108 | if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'): |
|
108 | if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'): | |
109 | import textwrap |
|
109 | import textwrap | |
110 |
|
110 | |||
111 | # List of things to be updated. Each entry is a triplet of args for |
|
111 | # List of things to be updated. Each entry is a triplet of args for | |
112 | # target_update() |
|
112 | # target_update() | |
113 | to_update = [ |
|
113 | to_update = [ | |
114 | # FIXME - Disabled for now: we need to redo an automatic way |
|
114 | # FIXME - Disabled for now: we need to redo an automatic way | |
115 | # of generating the magic info inside the rst. |
|
115 | # of generating the magic info inside the rst. | |
116 | #('docs/magic.tex', |
|
116 | #('docs/magic.tex', | |
117 | #['IPython/Magic.py'], |
|
117 | #['IPython/Magic.py'], | |
118 | #"cd doc && ./update_magic.sh" ), |
|
118 | #"cd doc && ./update_magic.sh" ), | |
119 |
|
119 | |||
120 | ('docs/man/ipcluster.1.gz', |
|
120 | ('docs/man/ipcluster.1.gz', | |
121 | ['docs/man/ipcluster.1'], |
|
121 | ['docs/man/ipcluster.1'], | |
122 | 'cd docs/man && gzip -9c ipcluster.1 > ipcluster.1.gz'), |
|
122 | 'cd docs/man && gzip -9c ipcluster.1 > ipcluster.1.gz'), | |
123 |
|
123 | |||
124 | ('docs/man/ipcontroller.1.gz', |
|
124 | ('docs/man/ipcontroller.1.gz', | |
125 | ['docs/man/ipcontroller.1'], |
|
125 | ['docs/man/ipcontroller.1'], | |
126 | 'cd docs/man && gzip -9c ipcontroller.1 > ipcontroller.1.gz'), |
|
126 | 'cd docs/man && gzip -9c ipcontroller.1 > ipcontroller.1.gz'), | |
127 |
|
127 | |||
128 | ('docs/man/ipengine.1.gz', |
|
128 | ('docs/man/ipengine.1.gz', | |
129 | ['docs/man/ipengine.1'], |
|
129 | ['docs/man/ipengine.1'], | |
130 | 'cd docs/man && gzip -9c ipengine.1 > ipengine.1.gz'), |
|
130 | 'cd docs/man && gzip -9c ipengine.1 > ipengine.1.gz'), | |
131 |
|
131 | |||
132 | ('docs/man/ipython.1.gz', |
|
132 | ('docs/man/ipython.1.gz', | |
133 | ['docs/man/ipython.1'], |
|
133 | ['docs/man/ipython.1'], | |
134 | 'cd docs/man && gzip -9c ipython.1 > ipython.1.gz'), |
|
134 | 'cd docs/man && gzip -9c ipython.1 > ipython.1.gz'), | |
135 |
|
135 | |||
136 | ('docs/man/ipython-wx.1.gz', |
|
136 | ('docs/man/ipython-wx.1.gz', | |
137 | ['docs/man/ipython-wx.1'], |
|
137 | ['docs/man/ipython-wx.1'], | |
138 | 'cd docs/man && gzip -9c ipython-wx.1 > ipython-wx.1.gz'), |
|
138 | 'cd docs/man && gzip -9c ipython-wx.1 > ipython-wx.1.gz'), | |
139 |
|
139 | |||
140 | ('docs/man/ipythonx.1.gz', |
|
140 | ('docs/man/ipythonx.1.gz', | |
141 | ['docs/man/ipythonx.1'], |
|
141 | ['docs/man/ipythonx.1'], | |
142 | 'cd docs/man && gzip -9c ipythonx.1 > ipythonx.1.gz'), |
|
142 | 'cd docs/man && gzip -9c ipythonx.1 > ipythonx.1.gz'), | |
143 |
|
143 | |||
144 | ('docs/man/irunner.1.gz', |
|
144 | ('docs/man/irunner.1.gz', | |
145 | ['docs/man/irunner.1'], |
|
145 | ['docs/man/irunner.1'], | |
146 | 'cd docs/man && gzip -9c irunner.1 > irunner.1.gz'), |
|
146 | 'cd docs/man && gzip -9c irunner.1 > irunner.1.gz'), | |
147 |
|
147 | |||
148 | ('docs/man/pycolor.1.gz', |
|
148 | ('docs/man/pycolor.1.gz', | |
149 | ['docs/man/pycolor.1'], |
|
149 | ['docs/man/pycolor.1'], | |
150 | 'cd docs/man && gzip -9c pycolor.1 > pycolor.1.gz'), |
|
150 | 'cd docs/man && gzip -9c pycolor.1 > pycolor.1.gz'), | |
151 | ] |
|
151 | ] | |
152 |
|
152 | |||
153 | # Only build the docs if sphinx is present |
|
153 | # Only build the docs if sphinx is present | |
154 | try: |
|
154 | try: | |
155 | import sphinx |
|
155 | import sphinx | |
156 | except ImportError: |
|
156 | except ImportError: | |
157 | pass |
|
157 | pass | |
158 | else: |
|
158 | else: | |
159 | # The Makefile calls the do_sphinx scripts to build html and pdf, so |
|
159 | # The Makefile calls the do_sphinx scripts to build html and pdf, so | |
160 | # just one target is enough to cover all manual generation |
|
160 | # just one target is enough to cover all manual generation | |
161 |
|
161 | |||
162 | # First, compute all the dependencies that can force us to rebuild the |
|
162 | # First, compute all the dependencies that can force us to rebuild the | |
163 | # docs. Start with the main release file that contains metadata |
|
163 | # docs. Start with the main release file that contains metadata | |
164 | docdeps = ['IPython/core/release.py'] |
|
164 | docdeps = ['IPython/core/release.py'] | |
165 | # Inculde all the reST sources |
|
165 | # Inculde all the reST sources | |
166 | pjoin = os.path.join |
|
166 | pjoin = os.path.join | |
167 | for dirpath,dirnames,filenames in os.walk('docs/source'): |
|
167 | for dirpath,dirnames,filenames in os.walk('docs/source'): | |
168 | if dirpath in ['_static','_templates']: |
|
168 | if dirpath in ['_static','_templates']: | |
169 | continue |
|
169 | continue | |
170 | docdeps += [ pjoin(dirpath,f) for f in filenames |
|
170 | docdeps += [ pjoin(dirpath,f) for f in filenames | |
171 | if f.endswith('.txt') ] |
|
171 | if f.endswith('.txt') ] | |
172 | # and the examples |
|
172 | # and the examples | |
173 | for dirpath,dirnames,filenames in os.walk('docs/example'): |
|
173 | for dirpath,dirnames,filenames in os.walk('docs/example'): | |
174 | docdeps += [ pjoin(dirpath,f) for f in filenames |
|
174 | docdeps += [ pjoin(dirpath,f) for f in filenames | |
175 | if not f.endswith('~') ] |
|
175 | if not f.endswith('~') ] | |
176 | # then, make them all dependencies for the main PDF (the html will get |
|
176 | # then, make them all dependencies for the main PDF (the html will get | |
177 | # auto-generated as well). |
|
177 | # auto-generated as well). | |
178 | to_update.append( |
|
178 | to_update.append( | |
179 | ('docs/dist/ipython.pdf', |
|
179 | ('docs/dist/ipython.pdf', | |
180 | docdeps, |
|
180 | docdeps, | |
181 | "cd docs && make dist") |
|
181 | "cd docs && make dist") | |
182 | ) |
|
182 | ) | |
183 |
|
183 | |||
184 | [ target_update(*t) for t in to_update ] |
|
184 | [ target_update(*t) for t in to_update ] | |
185 |
|
185 | |||
186 | #--------------------------------------------------------------------------- |
|
186 | #--------------------------------------------------------------------------- | |
187 | # Find all the packages, package data, scripts and data_files |
|
187 | # Find all the packages, package data, scripts and data_files | |
188 | #--------------------------------------------------------------------------- |
|
188 | #--------------------------------------------------------------------------- | |
189 |
|
189 | |||
190 | packages = find_packages() |
|
190 | packages = find_packages() | |
191 | package_data = find_package_data() |
|
191 | package_data = find_package_data() | |
192 | scripts = find_scripts() |
|
192 | scripts = find_scripts() | |
193 | data_files = find_data_files() |
|
193 | data_files = find_data_files() | |
194 |
|
194 | |||
195 | #--------------------------------------------------------------------------- |
|
195 | #--------------------------------------------------------------------------- | |
196 | # Handle dependencies and setuptools specific things |
|
196 | # Handle dependencies and setuptools specific things | |
197 | #--------------------------------------------------------------------------- |
|
197 | #--------------------------------------------------------------------------- | |
198 |
|
198 | |||
199 | # For some commands, use setuptools. Note that we do NOT list install here! |
|
199 | # For some commands, use setuptools. Note that we do NOT list install here! | |
200 | # If you want a setuptools-enhanced install, just run 'setupegg.py install' |
|
200 | # If you want a setuptools-enhanced install, just run 'setupegg.py install' | |
201 | if len(set(('develop', 'sdist', 'release', 'bdist_egg', 'bdist_rpm', |
|
201 | if len(set(('develop', 'sdist', 'release', 'bdist_egg', 'bdist_rpm', | |
202 | 'bdist', 'bdist_dumb', 'bdist_wininst', 'install_egg_info', |
|
202 | 'bdist', 'bdist_dumb', 'bdist_wininst', 'install_egg_info', | |
203 | 'build_sphinx', 'egg_info', 'easy_install', 'upload', |
|
203 | 'build_sphinx', 'egg_info', 'easy_install', 'upload', | |
204 | )).intersection(sys.argv)) > 0: |
|
204 | )).intersection(sys.argv)) > 0: | |
205 | import setuptools |
|
205 | import setuptools | |
206 |
|
206 | |||
207 | # This dict is used for passing extra arguments that are setuptools |
|
207 | # This dict is used for passing extra arguments that are setuptools | |
208 | # specific to setup |
|
208 | # specific to setup | |
209 | setuptools_extra_args = {} |
|
209 | setuptools_extra_args = {} | |
210 |
|
210 | |||
211 | if 'setuptools' in sys.modules: |
|
211 | if 'setuptools' in sys.modules: | |
212 | setuptools_extra_args['zip_safe'] = False |
|
212 | setuptools_extra_args['zip_safe'] = False | |
213 | setuptools_extra_args['entry_points'] = { |
|
213 | setuptools_extra_args['entry_points'] = { | |
214 | 'console_scripts': [ |
|
214 | 'console_scripts': [ | |
215 | 'ipython = IPython.frontend.terminal.ipapp:launch_new_instance', |
|
215 | 'ipython = IPython.frontend.terminal.ipapp:launch_new_instance', | |
216 | 'ipython-qtconsole = IPython.frontend.qt.console.ipythonqt:main', |
|
216 | 'ipython-qtconsole = IPython.frontend.qt.console.ipythonqt:main', | |
217 | 'pycolor = IPython.utils.PyColorize:main', |
|
217 | 'pycolor = IPython.utils.PyColorize:main', | |
218 | 'ipcontroller = IPython.kernel.ipcontrollerapp:launch_new_instance', |
|
218 | 'ipcontroller = IPython.kernel.ipcontrollerapp:launch_new_instance', | |
219 | 'ipengine = IPython.kernel.ipengineapp:launch_new_instance', |
|
219 | 'ipengine = IPython.kernel.ipengineapp:launch_new_instance', | |
220 | 'ipcluster = IPython.kernel.ipclusterapp:launch_new_instance', |
|
220 | 'ipcluster = IPython.kernel.ipclusterapp:launch_new_instance', | |
221 | 'iptest = IPython.testing.iptest:main', |
|
221 | 'iptest = IPython.testing.iptest:main', | |
222 | 'irunner = IPython.lib.irunner:main' |
|
222 | 'irunner = IPython.lib.irunner:main' | |
223 | ] |
|
223 | ] | |
224 | } |
|
224 | } | |
225 | setup_args['extras_require'] = dict( |
|
225 | setup_args['extras_require'] = dict( | |
226 | kernel = [ |
|
226 | kernel = [ | |
227 | 'zope.interface>=3.4.1', |
|
227 | 'zope.interface>=3.4.1', | |
228 | 'Twisted>=8.0.1', |
|
228 | 'Twisted>=8.0.1', | |
229 | 'foolscap>=0.2.6' |
|
229 | 'foolscap>=0.2.6' | |
230 | ], |
|
230 | ], | |
231 | doc='Sphinx>=0.3', |
|
231 | doc='Sphinx>=0.3', | |
232 | test='nose>=0.10.1', |
|
232 | test='nose>=0.10.1', | |
233 | security='pyOpenSSL>=0.6' |
|
233 | security='pyOpenSSL>=0.6' | |
234 | ) |
|
234 | ) | |
235 | # Allow setuptools to handle the scripts |
|
|||
236 | scripts = [] |
|
|||
237 | else: |
|
235 | else: | |
238 | # If we are running without setuptools, call this function which will |
|
236 | # If we are running without setuptools, call this function which will | |
239 | # check for dependencies an inform the user what is needed. This is |
|
237 | # check for dependencies an inform the user what is needed. This is | |
240 | # just to make life easy for users. |
|
238 | # just to make life easy for users. | |
241 | check_for_dependencies() |
|
239 | check_for_dependencies() | |
242 |
|
240 | |||
243 | #--------------------------------------------------------------------------- |
|
241 | #--------------------------------------------------------------------------- | |
244 | # Do the actual setup now |
|
242 | # Do the actual setup now | |
245 | #--------------------------------------------------------------------------- |
|
243 | #--------------------------------------------------------------------------- | |
246 |
|
244 | |||
247 | setup_args['cmdclass'] = {'build_py': record_commit_info('IPython')} |
|
245 | setup_args['cmdclass'] = {'build_py': record_commit_info('IPython')} | |
248 | setup_args['packages'] = packages |
|
246 | setup_args['packages'] = packages | |
249 | setup_args['package_data'] = package_data |
|
247 | setup_args['package_data'] = package_data | |
250 | setup_args['scripts'] = scripts |
|
248 | setup_args['scripts'] = scripts | |
251 | setup_args['data_files'] = data_files |
|
249 | setup_args['data_files'] = data_files | |
252 | setup_args.update(setuptools_extra_args) |
|
250 | setup_args.update(setuptools_extra_args) | |
253 |
|
251 | |||
254 |
|
252 | |||
255 | if __name__ == '__main__': |
|
253 | if __name__ == '__main__': | |
256 | setup(**setup_args) |
|
254 | setup(**setup_args) | |
257 | cleanup() |
|
255 | cleanup() |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file |
General Comments 0
You need to be logged in to leave comments.
Login now