##// END OF EJS Templates
changed setup to support easy_install ipython==dev
vivainio -
Show More
@@ -1,55 +1,19 b''
1 1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 """Setup script for IPython.
2 """Wrapper to build IPython as an egg (setuptools format)."""
4 3
5 Under Posix environments it works like a typical setup.py script.
6 Under Windows, the command sdist is not supported, since IPython
7 requires utilities, which are not available under Windows."""
4 import os
5 import sys
8 6
9 #*****************************************************************************
10 # Copyright (C) 2001-2005 Fernando Perez <fperez@colorado.edu>
11 #
12 # Distributed under the terms of the BSD License. The full license is in
13 # the file COPYING, distributed as part of this software.
14 #*****************************************************************************
7 # Add my local path to sys.path
8 home = os.environ['HOME']
9 sys.path.insert(0,'%s/usr/local/lib/python%s/site-packages' %
10 (home,sys.version[:3]))
15 11
16 import sys, os
17 from glob import glob
18 from setupext import install_data_ext
12 # now, import setuptools and call the actual setup
13 import setuptools
14 print sys.argv
15 #sys.argv=['','bdist_egg']
16 execfile('setup.py')
19 17
20 isfile = os.path.isfile
21
22 if os.path.exists('MANIFEST'): os.remove('MANIFEST')
23
24 from setuptools import setup
25
26
27 execfile(os.path.join('IPython','Release.py'))
28
29 cfgfiles = filter(isfile, glob('IPython/UserConfig/*'))
30
31
32 # Call the setup() routine which does most of the work
33 setup(name = name,
34 version = version,
35 description = description,
36 long_description = long_description,
37 author = authors['Fernando'][0],
38 author_email = authors['Fernando'][1],
39 url = url,
40 download_url = download_url,
41 license = license,
42 platforms = platforms,
43 keywords = keywords,
44 packages = ['IPython', 'IPython.Extensions'],
45 cmdclass = {'install_data': install_data_ext},
46 data_files = [
47 ('lib', 'IPython/UserConfig', cfgfiles)],
48 # egg options
49 entry_points = {
50 'console_scripts': [
51 'ipython = IPython.ipapi:launch_new_instance',
52 'pycolor = IPython.PyColorize:main'
53 ],
54 }
55 )
18 # clean up the junk left around by setuptools
19 os.system('rm -rf ipython.egg-info build')
@@ -125,6 +125,30 b" if 'bdist_wininst' in sys.argv:"
125 125 sys.exit(1)
126 126 scriptfiles.append('scripts/ipython_win_post_install.py')
127 127
128 datafiles = [('data', docdirbase, docfiles),
129 ('data', os.path.join(docdirbase, 'examples'),
130 examfiles),
131 ('data', os.path.join(docdirbase, 'manual'),
132 manfiles),
133 ('data', manpagebase, manpages),
134 ('lib', 'IPython/UserConfig', cfgfiles)]
135
136 if 'setuptools' in sys.modules:
137 # setuptools config for egg building
138 egg_extra_kwds = {
139 'entry_points': {
140 'console_scripts': [
141 'ipython = IPython.ipapi:launch_new_instance',
142 'pycolor = IPython.PyColorize:main'
143 ]}
144 }
145 scriptfiles = []
146 # eggs will lack docs, examples
147 datafiles = [('lib', 'IPython/UserConfig', cfgfiles)]
148 else:
149 egg_extra_kwds = {}
150
151
128 152 # Call the setup() routine which does most of the work
129 153 setup(name = name,
130 154 version = version,
@@ -139,12 +163,9 b' setup(name = name,'
139 163 keywords = keywords,
140 164 packages = ['IPython', 'IPython.Extensions'],
141 165 scripts = scriptfiles,
166
142 167 cmdclass = {'install_data': install_data_ext},
143 data_files = [('data', docdirbase, docfiles),
144 ('data', os.path.join(docdirbase, 'examples'),
145 examfiles),
146 ('data', os.path.join(docdirbase, 'manual'),
147 manfiles),
148 ('data', manpagebase, manpages),
149 ('lib', 'IPython/UserConfig', cfgfiles)]
168 data_files = datafiles,
169 # extra params needed for eggs
170 **egg_extra_kwds
150 171 )
General Comments 0
You need to be logged in to leave comments. Login now