##// END OF EJS Templates
Fixes to build system.
Fernando Perez -
Show More
@@ -1,30 +1,31 b''
1 include README_Windows.txt
1 include README_Windows.txt
2 include win32_manual_post_install.py
2 include win32_manual_post_install.py
3 include ipython.py
3 include ipython.py
4 include setupbase.py
4
5
5 graft scripts
6 graft scripts
6
7
7 graft setupext
8 graft setupext
8
9
9 graft IPython/UserConfig
10 graft IPython/UserConfig
10
11
11 graft IPython/kernel
12 graft IPython/kernel
12 graft IPython/config
13 graft IPython/config
13 graft IPython/testing
14 graft IPython/testing
14 graft IPython/tools
15 graft IPython/tools
15
16
16 graft docs
17 graft docs
17 exclude docs/\#*
18 exclude docs/\#*
18 exclude docs/man/*.1
19 exclude docs/man/*.1
19
20
20 # There seems to be no way of excluding whole subdirectories, other than
21 # There seems to be no way of excluding whole subdirectories, other than
21 # manually excluding all their subdirs. distutils really is horrible...
22 # manually excluding all their subdirs. distutils really is horrible...
22 exclude docs/attic/*
23 exclude docs/attic/*
23 exclude docs/build/*
24 exclude docs/build/*
24
25
25 global-exclude *~
26 global-exclude *~
26 global-exclude *.flc
27 global-exclude *.flc
27 global-exclude *.pyc
28 global-exclude *.pyc
28 global-exclude .dircopy.log
29 global-exclude .dircopy.log
29 global-exclude .svn
30 global-exclude .svn
30 global-exclude .bzr
31 global-exclude .bzr
@@ -1,175 +1,175 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 The IPython Development Team
10 # Copyright (C) 2008 The IPython Development Team
11 #
11 #
12 # Distributed under the terms of the BSD License. The full license is in
12 # Distributed under the terms of the BSD License. The full license is in
13 # the file COPYING, distributed as part of this software.
13 # the file COPYING, distributed as part of this software.
14 #-------------------------------------------------------------------------------
14 #-------------------------------------------------------------------------------
15
15
16 #-------------------------------------------------------------------------------
16 #-------------------------------------------------------------------------------
17 # Imports
17 # Imports
18 #-------------------------------------------------------------------------------
18 #-------------------------------------------------------------------------------
19
19
20 # Stdlib imports
20 # Stdlib imports
21 import os
21 import os
22 import sys
22 import sys
23
23
24 from glob import glob
24 from glob import glob
25
25
26 # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
26 # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
27 # update it when the contents of directories change.
27 # update it when the contents of directories change.
28 if os.path.exists('MANIFEST'): os.remove('MANIFEST')
28 if os.path.exists('MANIFEST'): os.remove('MANIFEST')
29
29
30 from distutils.core import setup
30 from distutils.core import setup
31
31
32 # Local imports
32 # Local imports
33 from IPython.genutils import target_update
33 from IPython.genutils import target_update
34
34
35 from setupbase import (
35 from setupbase import (
36 setup_args,
36 setup_args,
37 find_packages,
37 find_packages,
38 find_package_data,
38 find_package_data,
39 find_scripts,
39 find_scripts,
40 find_data_files,
40 find_data_files,
41 check_for_dependencies
41 check_for_dependencies
42 )
42 )
43
43
44 isfile = os.path.isfile
44 isfile = os.path.isfile
45
45
46 #-------------------------------------------------------------------------------
46 #-------------------------------------------------------------------------------
47 # Handle OS specific things
47 # Handle OS specific things
48 #-------------------------------------------------------------------------------
48 #-------------------------------------------------------------------------------
49
49
50 if os.name == 'posix':
50 if os.name == 'posix':
51 os_name = 'posix'
51 os_name = 'posix'
52 elif os.name in ['nt','dos']:
52 elif os.name in ['nt','dos']:
53 os_name = 'windows'
53 os_name = 'windows'
54 else:
54 else:
55 print 'Unsupported operating system:',os.name
55 print 'Unsupported operating system:',os.name
56 sys.exit(1)
56 sys.exit(1)
57
57
58 # Under Windows, 'sdist' has not been supported. Now that the docs build with
58 # Under Windows, 'sdist' has not been supported. Now that the docs build with
59 # Sphinx it might work, but let's not turn it on until someone confirms that it
59 # Sphinx it might work, but let's not turn it on until someone confirms that it
60 # actually works.
60 # actually works.
61 if os_name == 'windows' and 'sdist' in sys.argv:
61 if os_name == 'windows' and 'sdist' in sys.argv:
62 print 'The sdist command is not available under Windows. Exiting.'
62 print 'The sdist command is not available under Windows. Exiting.'
63 sys.exit(1)
63 sys.exit(1)
64
64
65 #-------------------------------------------------------------------------------
65 #-------------------------------------------------------------------------------
66 # Things related to the IPython documentation
66 # Things related to the IPython documentation
67 #-------------------------------------------------------------------------------
67 #-------------------------------------------------------------------------------
68
68
69 # update the manuals when building a source dist
69 # update the manuals when building a source dist
70 if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'):
70 if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'):
71 import textwrap
71 import textwrap
72
72
73 # List of things to be updated. Each entry is a triplet of args for
73 # List of things to be updated. Each entry is a triplet of args for
74 # target_update()
74 # target_update()
75 to_update = [
75 to_update = [
76 # FIXME - Disabled for now: we need to redo an automatic way
76 # FIXME - Disabled for now: we need to redo an automatic way
77 # of generating the magic info inside the rst.
77 # of generating the magic info inside the rst.
78 #('doc/magic.tex',
78 #('docs/magic.tex',
79 #['IPython/Magic.py'],
79 #['IPython/Magic.py'],
80 #"cd doc && ./update_magic.sh" ),
80 #"cd doc && ./update_magic.sh" ),
81
81
82 ('doc/ipython.1.gz',
82 ('docs/man/ipython.1.gz',
83 ['doc/ipython.1'],
83 ['docs/man/ipython.1'],
84 "cd doc && gzip -9c ipython.1 > ipython.1.gz"),
84 "cd docs/man && gzip -9c ipython.1 > ipython.1.gz"),
85
85
86 ('doc/pycolor.1.gz',
86 ('docs/man/pycolor.1.gz',
87 ['doc/pycolor.1'],
87 ['docs/man/pycolor.1'],
88 "cd doc && gzip -9c pycolor.1 > pycolor.1.gz"),
88 "cd docs/man && gzip -9c pycolor.1 > pycolor.1.gz"),
89 ]
89 ]
90
90
91 # Only build the docs is sphinx is present
91 # Only build the docs is sphinx is present
92 try:
92 try:
93 import sphinx
93 import sphinx
94 except ImportError:
94 except ImportError:
95 pass
95 pass
96 else:
96 else:
97 pass
97 pass
98 # BEG: This is disabled as I am not sure what to depend on.
98 # BEG: This is disabled as I am not sure what to depend on.
99 # I actually don't think we should be automatically building
99 # I actually don't think we should be automatically building
100 # the docs for people.
100 # the docs for people.
101 # The do_sphinx scripts builds html and pdf, so just one
101 # The do_sphinx scripts builds html and pdf, so just one
102 # target is enough to cover all manual generation
102 # target is enough to cover all manual generation
103 # to_update.append(
103 # to_update.append(
104 # ('doc/manual/ipython.pdf',
104 # ('docs/manual/ipython.pdf',
105 # ['IPython/Release.py','doc/source/ipython.rst'],
105 # ['IPython/Release.py','docs/source/ipython.rst'],
106 # "cd docs && python do_sphinx.py")
106 # "cd docs && python do_sphinx.py")
107 # )
107 # )
108 [ target_update(*t) for t in to_update ]
108 [ target_update(*t) for t in to_update ]
109
109
110 #---------------------------------------------------------------------------
110 #---------------------------------------------------------------------------
111 # Find all the packages, package data, scripts and data_files
111 # Find all the packages, package data, scripts and data_files
112 #---------------------------------------------------------------------------
112 #---------------------------------------------------------------------------
113
113
114 packages = find_packages()
114 packages = find_packages()
115 package_data = find_package_data()
115 package_data = find_package_data()
116 scripts = find_scripts()
116 scripts = find_scripts()
117 data_files = find_data_files()
117 data_files = find_data_files()
118
118
119 #---------------------------------------------------------------------------
119 #---------------------------------------------------------------------------
120 # Handle dependencies and setuptools specific things
120 # Handle dependencies and setuptools specific things
121 #---------------------------------------------------------------------------
121 #---------------------------------------------------------------------------
122
122
123 # This dict is used for passing extra arguments that are setuptools
123 # This dict is used for passing extra arguments that are setuptools
124 # specific to setup
124 # specific to setup
125 setuptools_extra_args = {}
125 setuptools_extra_args = {}
126
126
127 if 'setuptools' in sys.modules:
127 if 'setuptools' in sys.modules:
128 setuptools_extra_args['zip_safe'] = False
128 setuptools_extra_args['zip_safe'] = False
129 setuptools_extra_args['entry_points'] = {
129 setuptools_extra_args['entry_points'] = {
130 'console_scripts': [
130 'console_scripts': [
131 'ipython = IPython.ipapi:launch_new_instance',
131 'ipython = IPython.ipapi:launch_new_instance',
132 'pycolor = IPython.PyColorize:main',
132 'pycolor = IPython.PyColorize:main',
133 'ipcontroller = IPython.kernel.scripts.ipcontroller:main',
133 'ipcontroller = IPython.kernel.scripts.ipcontroller:main',
134 'ipengine = IPython.kernel.scripts.ipengine:main',
134 'ipengine = IPython.kernel.scripts.ipengine:main',
135 'ipcluster = IPython.kernel.scripts.ipcluster:main',
135 'ipcluster = IPython.kernel.scripts.ipcluster:main',
136 'ipythonx = IPython.frontend.wx.ipythonx:main'
136 'ipythonx = IPython.frontend.wx.ipythonx:main'
137 ]
137 ]
138 }
138 }
139 setup_args["extras_require"] = dict(
139 setup_args["extras_require"] = dict(
140 kernel = [
140 kernel = [
141 "zope.interface>=3.4.1",
141 "zope.interface>=3.4.1",
142 "Twisted>=8.0.1",
142 "Twisted>=8.0.1",
143 "foolscap>=0.2.6"
143 "foolscap>=0.2.6"
144 ],
144 ],
145 doc=['Sphinx>=0.3','pygments'],
145 doc=['Sphinx>=0.3','pygments'],
146 test='nose>=0.10.1',
146 test='nose>=0.10.1',
147 security=["pyOpenSSL>=0.6"]
147 security=["pyOpenSSL>=0.6"]
148 )
148 )
149 # Allow setuptools to handle the scripts
149 # Allow setuptools to handle the scripts
150 scripts = []
150 scripts = []
151 # eggs will lack docs, examples
151 # eggs will lack docs, examples
152 data_files = []
152 data_files = []
153 else:
153 else:
154 # package_data of setuptools was introduced to distutils in 2.4
154 # package_data of setuptools was introduced to distutils in 2.4
155 cfgfiles = filter(isfile, glob('IPython/UserConfig/*'))
155 cfgfiles = filter(isfile, glob('IPython/UserConfig/*'))
156 if sys.version_info < (2,4):
156 if sys.version_info < (2,4):
157 data_files.append(('lib', 'IPython/UserConfig', cfgfiles))
157 data_files.append(('lib', 'IPython/UserConfig', cfgfiles))
158 # If we are running without setuptools, call this function which will
158 # If we are running without setuptools, call this function which will
159 # check for dependencies an inform the user what is needed. This is
159 # check for dependencies an inform the user what is needed. This is
160 # just to make life easy for users.
160 # just to make life easy for users.
161 check_for_dependencies()
161 check_for_dependencies()
162
162
163
163
164 #---------------------------------------------------------------------------
164 #---------------------------------------------------------------------------
165 # Do the actual setup now
165 # Do the actual setup now
166 #---------------------------------------------------------------------------
166 #---------------------------------------------------------------------------
167
167
168 setup_args['packages'] = packages
168 setup_args['packages'] = packages
169 setup_args['package_data'] = package_data
169 setup_args['package_data'] = package_data
170 setup_args['scripts'] = scripts
170 setup_args['scripts'] = scripts
171 setup_args['data_files'] = data_files
171 setup_args['data_files'] = data_files
172 setup_args.update(setuptools_extra_args)
172 setup_args.update(setuptools_extra_args)
173
173
174 if __name__ == '__main__':
174 if __name__ == '__main__':
175 setup(**setup_args)
175 setup(**setup_args)
@@ -1,237 +1,244 b''
1 # encoding: utf-8
1 # encoding: utf-8
2
2
3 """
3 """
4 This module defines the things that are used in setup.py for building IPython
4 This module defines the things that are used in setup.py for building IPython
5
5
6 This includes:
6 This includes:
7
7
8 * The basic arguments to setup
8 * The basic arguments to setup
9 * Functions for finding things like packages, package data, etc.
9 * Functions for finding things like packages, package data, etc.
10 * A function for checking dependencies.
10 * A function for checking dependencies.
11 """
11 """
12
12
13 __docformat__ = "restructuredtext en"
13 __docformat__ = "restructuredtext en"
14
14
15 #-------------------------------------------------------------------------------
15 #-------------------------------------------------------------------------------
16 # Copyright (C) 2008 The IPython Development Team
16 # Copyright (C) 2008 The IPython Development Team
17 #
17 #
18 # Distributed under the terms of the BSD License. The full license is in
18 # Distributed under the terms of the BSD License. The full license is in
19 # the file COPYING, distributed as part of this software.
19 # the file COPYING, distributed as part of this software.
20 #-------------------------------------------------------------------------------
20 #-------------------------------------------------------------------------------
21
21
22 #-------------------------------------------------------------------------------
22 #-------------------------------------------------------------------------------
23 # Imports
23 # Imports
24 #-------------------------------------------------------------------------------
24 #-------------------------------------------------------------------------------
25
25
26 import os, sys
26 import os, sys
27
27
28 from glob import glob
28 from glob import glob
29
29
30 from setupext import install_data_ext
30 from setupext import install_data_ext
31
31
32 #-------------------------------------------------------------------------------
32 #-------------------------------------------------------------------------------
33 # Useful globals and utility functions
33 # Useful globals and utility functions
34 #-------------------------------------------------------------------------------
34 #-------------------------------------------------------------------------------
35
35
36 # A few handy globals
36 # A few handy globals
37 isfile = os.path.isfile
37 isfile = os.path.isfile
38 pjoin = os.path.join
38 pjoin = os.path.join
39
39
40 def oscmd(s):
40 def oscmd(s):
41 print ">", s
41 print ">", s
42 os.system(s)
42 os.system(s)
43
43
44 # A little utility we'll need below, since glob() does NOT allow you to do
44 # A little utility we'll need below, since glob() does NOT allow you to do
45 # exclusion on multiple endings!
45 # exclusion on multiple endings!
46 def file_doesnt_endwith(test,endings):
46 def file_doesnt_endwith(test,endings):
47 """Return true if test is a file and its name does NOT end with any
47 """Return true if test is a file and its name does NOT end with any
48 of the strings listed in endings."""
48 of the strings listed in endings."""
49 if not isfile(test):
49 if not isfile(test):
50 return False
50 return False
51 for e in endings:
51 for e in endings:
52 if test.endswith(e):
52 if test.endswith(e):
53 return False
53 return False
54 return True
54 return True
55
55
56 #---------------------------------------------------------------------------
56 #---------------------------------------------------------------------------
57 # Basic project information
57 # Basic project information
58 #---------------------------------------------------------------------------
58 #---------------------------------------------------------------------------
59
59
60 # Release.py contains version, authors, license, url, keywords, etc.
60 # Release.py contains version, authors, license, url, keywords, etc.
61 execfile(pjoin('IPython','Release.py'))
61 execfile(pjoin('IPython','Release.py'))
62
62
63 # Create a dict with the basic information
63 # Create a dict with the basic information
64 # This dict is eventually passed to setup after additional keys are added.
64 # This dict is eventually passed to setup after additional keys are added.
65 setup_args = dict(
65 setup_args = dict(
66 name = name,
66 name = name,
67 version = version,
67 version = version,
68 description = description,
68 description = description,
69 long_description = long_description,
69 long_description = long_description,
70 author = author,
70 author = author,
71 author_email = author_email,
71 author_email = author_email,
72 url = url,
72 url = url,
73 download_url = download_url,
73 download_url = download_url,
74 license = license,
74 license = license,
75 platforms = platforms,
75 platforms = platforms,
76 keywords = keywords,
76 keywords = keywords,
77 cmdclass = {'install_data': install_data_ext},
77 cmdclass = {'install_data': install_data_ext},
78 )
78 )
79
79
80
80
81 #---------------------------------------------------------------------------
81 #---------------------------------------------------------------------------
82 # Find packages
82 # Find packages
83 #---------------------------------------------------------------------------
83 #---------------------------------------------------------------------------
84
84
85 def add_package(packages, pname, config=False, tests=False, scripts=False, others=None):
85 def add_package(packages, pname, config=False, tests=False, scripts=False, others=None):
86 """
86 """
87 Add a package to the list of packages, including certain subpackages.
87 Add a package to the list of packages, including certain subpackages.
88 """
88 """
89 packages.append('.'.join(['IPython',pname]))
89 packages.append('.'.join(['IPython',pname]))
90 if config:
90 if config:
91 packages.append('.'.join(['IPython',pname,'config']))
91 packages.append('.'.join(['IPython',pname,'config']))
92 if tests:
92 if tests:
93 packages.append('.'.join(['IPython',pname,'tests']))
93 packages.append('.'.join(['IPython',pname,'tests']))
94 if scripts:
94 if scripts:
95 packages.append('.'.join(['IPython',pname,'scripts']))
95 packages.append('.'.join(['IPython',pname,'scripts']))
96 if others is not None:
96 if others is not None:
97 for o in others:
97 for o in others:
98 packages.append('.'.join(['IPython',pname,o]))
98 packages.append('.'.join(['IPython',pname,o]))
99
99
100 def find_packages():
100 def find_packages():
101 """
101 """
102 Find all of IPython's packages.
102 Find all of IPython's packages.
103 """
103 """
104 packages = ['IPython']
104 packages = ['IPython']
105 add_package(packages, 'config', tests=True)
105 add_package(packages, 'config', tests=True)
106 add_package(packages , 'Extensions')
106 add_package(packages , 'Extensions')
107 add_package(packages, 'external')
107 add_package(packages, 'external')
108 add_package(packages, 'gui')
108 add_package(packages, 'gui')
109 add_package(packages, 'gui.wx')
109 add_package(packages, 'gui.wx')
110 add_package(packages, 'frontend', tests=True)
110 add_package(packages, 'frontend', tests=True)
111 add_package(packages, 'frontend._process')
111 add_package(packages, 'frontend._process')
112 add_package(packages, 'frontend.wx')
112 add_package(packages, 'frontend.wx')
113 add_package(packages, 'frontend.cocoa', tests=True)
113 add_package(packages, 'frontend.cocoa', tests=True)
114 add_package(packages, 'kernel', config=True, tests=True, scripts=True)
114 add_package(packages, 'kernel', config=True, tests=True, scripts=True)
115 add_package(packages, 'kernel.core', config=True, tests=True)
115 add_package(packages, 'kernel.core', config=True, tests=True)
116 add_package(packages, 'testing', tests=True)
116 add_package(packages, 'testing', tests=True)
117 add_package(packages, 'tools', tests=True)
117 add_package(packages, 'tools', tests=True)
118 add_package(packages, 'UserConfig')
118 add_package(packages, 'UserConfig')
119 return packages
119 return packages
120
120
121 #---------------------------------------------------------------------------
121 #---------------------------------------------------------------------------
122 # Find package data
122 # Find package data
123 #---------------------------------------------------------------------------
123 #---------------------------------------------------------------------------
124
124
125 def find_package_data():
125 def find_package_data():
126 """
126 """
127 Find IPython's package_data.
127 Find IPython's package_data.
128 """
128 """
129 # This is not enough for these things to appear in an sdist.
129 # This is not enough for these things to appear in an sdist.
130 # We need to muck with the MANIFEST to get this to work
130 # We need to muck with the MANIFEST to get this to work
131 package_data = {
131 package_data = {
132 'IPython.UserConfig' : ['*'],
132 'IPython.UserConfig' : ['*'],
133 'IPython.tools.tests' : ['*.txt'],
133 'IPython.tools.tests' : ['*.txt'],
134 'IPython.testing' : ['*.txt']
134 'IPython.testing' : ['*.txt']
135 }
135 }
136 return package_data
136 return package_data
137
137
138
138
139 #---------------------------------------------------------------------------
139 #---------------------------------------------------------------------------
140 # Find data files
140 # Find data files
141 #---------------------------------------------------------------------------
141 #---------------------------------------------------------------------------
142
142
143 def find_data_files():
143 def find_data_files():
144 """
144 """
145 Find IPython's data_files.
145 Find IPython's data_files.
146 """
146 """
147
147
148 # I can't find how to make distutils create a nested dir. structure, so
148 # I can't find how to make distutils create a nested dir. structure, so
149 # in the meantime do it manually. Butt ugly.
149 # in the meantime do it manually. Butt ugly.
150 # Note that http://www.redbrick.dcu.ie/~noel/distutils.html, ex. 2/3, contain
150 # Note that http://www.redbrick.dcu.ie/~noel/distutils.html, ex. 2/3, contain
151 # information on how to do this more cleanly once python 2.4 can be assumed.
151 # information on how to do this more cleanly once python 2.4 can be assumed.
152 # Thanks to Noel for the tip.
152 # Thanks to Noel for the tip.
153 docdirbase = 'share/doc/ipython'
153 docdirbase = 'share/doc/ipython'
154 manpagebase = 'share/man/man1'
154 manpagebase = 'share/man/man1'
155
155
156 # We only need to exclude from this things NOT already excluded in the
156 # We only need to exclude from this things NOT already excluded in the
157 # MANIFEST.in file.
157 # MANIFEST.in file.
158 exclude = ('.sh','.1.gz')
158 exclude = ('.sh','.1.gz')
159 # We need to figure out how we want to package all of our rst docs?
159 # We need to figure out how we want to package all of our rst docs?
160 # docfiles = filter(lambda f:file_doesnt_endwith(f,exclude),glob('docs/*'))
160 # docfiles = filter(lambda f:file_doesnt_endwith(f,exclude),glob('docs/*'))
161 # XXX - For now all the example files
161 examfiles = filter(isfile, glob('docs/examples/core/*.py'))
162 examfiles = filter(isfile, glob('docs/examples/core/*.py'))
162 examfiles.append(filter(isfile, glob('docs/examples/kernel/*.py')))
163 examfiles += filter(isfile, glob('docs/examples/kernel/*.py'))
164
163 manpages = filter(isfile, glob('docs/man/*.1.gz'))
165 manpages = filter(isfile, glob('docs/man/*.1.gz'))
164 igridhelpfiles = filter(isfile, glob('IPython/Extensions/igrid_help.*'))
166 igridhelpfiles = filter(isfile, glob('IPython/Extensions/igrid_help.*'))
165
167
166 data_files = [#('data', docdirbase, docfiles),
168 data_files = [#('data', docdirbase, docfiles),
167 ('data', pjoin(docdirbase, 'examples'),examfiles),
169 ('data', pjoin(docdirbase, 'examples'),examfiles),
168 ('data', manpagebase, manpages),
170 ('data', manpagebase, manpages),
169 ('data',pjoin(docdirbase, 'extensions'),igridhelpfiles),
171 ('data',pjoin(docdirbase, 'extensions'),igridhelpfiles),
170 ]
172 ]
171 # import pprint
173
172 # pprint.pprint(data_files)
174 ## import pprint # dbg
173 return []
175 ## print '*'*80
176 ## print 'data files'
177 ## pprint.pprint(data_files)
178 ## print '*'*80
179
180 return data_files
174
181
175 #---------------------------------------------------------------------------
182 #---------------------------------------------------------------------------
176 # Find scripts
183 # Find scripts
177 #---------------------------------------------------------------------------
184 #---------------------------------------------------------------------------
178
185
179 def find_scripts():
186 def find_scripts():
180 """
187 """
181 Find IPython's scripts.
188 Find IPython's scripts.
182 """
189 """
183 scripts = []
190 scripts = []
184 scripts.append('IPython/kernel/scripts/ipengine')
191 scripts.append('IPython/kernel/scripts/ipengine')
185 scripts.append('IPython/kernel/scripts/ipcontroller')
192 scripts.append('IPython/kernel/scripts/ipcontroller')
186 scripts.append('IPython/kernel/scripts/ipcluster')
193 scripts.append('IPython/kernel/scripts/ipcluster')
187 scripts.append('scripts/ipython')
194 scripts.append('scripts/ipython')
188 scripts.append('scripts/ipythonx')
195 scripts.append('scripts/ipythonx')
189 scripts.append('scripts/pycolor')
196 scripts.append('scripts/pycolor')
190 scripts.append('scripts/irunner')
197 scripts.append('scripts/irunner')
191
198
192 # Script to be run by the windows binary installer after the default setup
199 # Script to be run by the windows binary installer after the default setup
193 # routine, to add shortcuts and similar windows-only things. Windows
200 # routine, to add shortcuts and similar windows-only things. Windows
194 # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
201 # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
195 # doesn't find them.
202 # doesn't find them.
196 if 'bdist_wininst' in sys.argv:
203 if 'bdist_wininst' in sys.argv:
197 if len(sys.argv) > 2 and ('sdist' in sys.argv or 'bdist_rpm' in sys.argv):
204 if len(sys.argv) > 2 and ('sdist' in sys.argv or 'bdist_rpm' in sys.argv):
198 print >> sys.stderr,"ERROR: bdist_wininst must be run alone. Exiting."
205 print >> sys.stderr,"ERROR: bdist_wininst must be run alone. Exiting."
199 sys.exit(1)
206 sys.exit(1)
200 scripts.append('scripts/ipython_win_post_install.py')
207 scripts.append('scripts/ipython_win_post_install.py')
201
208
202 return scripts
209 return scripts
203
210
204 #---------------------------------------------------------------------------
211 #---------------------------------------------------------------------------
205 # Find scripts
212 # Find scripts
206 #---------------------------------------------------------------------------
213 #---------------------------------------------------------------------------
207
214
208 def check_for_dependencies():
215 def check_for_dependencies():
209 """Check for IPython's dependencies.
216 """Check for IPython's dependencies.
210
217
211 This function should NOT be called if running under setuptools!
218 This function should NOT be called if running under setuptools!
212 """
219 """
213 from setupext.setupext import (
220 from setupext.setupext import (
214 print_line, print_raw, print_status, print_message,
221 print_line, print_raw, print_status, print_message,
215 check_for_zopeinterface, check_for_twisted,
222 check_for_zopeinterface, check_for_twisted,
216 check_for_foolscap, check_for_pyopenssl,
223 check_for_foolscap, check_for_pyopenssl,
217 check_for_sphinx, check_for_pygments,
224 check_for_sphinx, check_for_pygments,
218 check_for_nose, check_for_pexpect
225 check_for_nose, check_for_pexpect
219 )
226 )
220 print_line()
227 print_line()
221 print_raw("BUILDING IPYTHON")
228 print_raw("BUILDING IPYTHON")
222 print_status('python', sys.version)
229 print_status('python', sys.version)
223 print_status('platform', sys.platform)
230 print_status('platform', sys.platform)
224 if sys.platform == 'win32':
231 if sys.platform == 'win32':
225 print_status('Windows version', sys.getwindowsversion())
232 print_status('Windows version', sys.getwindowsversion())
226
233
227 print_raw("")
234 print_raw("")
228 print_raw("OPTIONAL DEPENDENCIES")
235 print_raw("OPTIONAL DEPENDENCIES")
229
236
230 check_for_zopeinterface()
237 check_for_zopeinterface()
231 check_for_twisted()
238 check_for_twisted()
232 check_for_foolscap()
239 check_for_foolscap()
233 check_for_pyopenssl()
240 check_for_pyopenssl()
234 check_for_sphinx()
241 check_for_sphinx()
235 check_for_pygments()
242 check_for_pygments()
236 check_for_nose()
243 check_for_nose()
237 check_for_pexpect()
244 check_for_pexpect()
General Comments 0
You need to be logged in to leave comments. Login now