##// END OF EJS Templates
Move cleanup to main setup.py, where it belongs....
Fernando Perez -
Show More
@@ -23,7 +23,7 b" name = 'ipython'"
23 development = True # change this to False to do a release
23 development = True # change this to False to do a release
24 version_base = '0.11'
24 version_base = '0.11'
25 branch = 'ipython'
25 branch = 'ipython'
26 revision = '1312'
26 revision = '1313'
27
27
28 if development:
28 if development:
29 if branch == 'ipython':
29 if branch == 'ipython':
@@ -19,6 +19,7 b' requires utilities which are not available under Windows."""'
19
19
20 # Stdlib imports
20 # Stdlib imports
21 import os
21 import os
22 import shutil
22 import sys
23 import sys
23
24
24 from glob import glob
25 from glob import glob
@@ -43,6 +44,21 b' from setupbase import ('
43 isfile = os.path.isfile
44 isfile = os.path.isfile
44 pjoin = os.path.join
45 pjoin = os.path.join
45
46
47 #-----------------------------------------------------------------------------
48 # Function definitions
49 #-----------------------------------------------------------------------------
50
51 def cleanup():
52 """Clean up the junk left around by the build process"""
53 if "develop" not in sys.argv:
54 try:
55 shutil.rmtree('ipython.egg-info')
56 except:
57 try:
58 os.unlink('ipython.egg-info')
59 except:
60 pass
61
46 #-------------------------------------------------------------------------------
62 #-------------------------------------------------------------------------------
47 # Handle OS specific things
63 # Handle OS specific things
48 #-------------------------------------------------------------------------------
64 #-------------------------------------------------------------------------------
@@ -144,7 +160,6 b" if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'):"
144 )
160 )
145
161
146 [ target_update(*t) for t in to_update ]
162 [ target_update(*t) for t in to_update ]
147
148
163
149 #---------------------------------------------------------------------------
164 #---------------------------------------------------------------------------
150 # Find all the packages, package data, scripts and data_files
165 # Find all the packages, package data, scripts and data_files
@@ -203,7 +218,6 b' else:'
203 # just to make life easy for users.
218 # just to make life easy for users.
204 check_for_dependencies()
219 check_for_dependencies()
205
220
206
207 #---------------------------------------------------------------------------
221 #---------------------------------------------------------------------------
208 # Do the actual setup now
222 # Do the actual setup now
209 #---------------------------------------------------------------------------
223 #---------------------------------------------------------------------------
@@ -214,5 +228,7 b" setup_args['scripts'] = scripts"
214 setup_args['data_files'] = data_files
228 setup_args['data_files'] = data_files
215 setup_args.update(setuptools_extra_args)
229 setup_args.update(setuptools_extra_args)
216
230
231
217 if __name__ == '__main__':
232 if __name__ == '__main__':
218 setup(**setup_args)
233 setup(**setup_args)
234 cleanup()
@@ -1,20 +1,6 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 """Wrapper to run setup.py using setuptools."""
2 """Wrapper to run setup.py using setuptools."""
3
3
4 import os
4 # Import setuptools and call the actual setup
5 import shutil
6 import sys
7
8 # now, import setuptools and call the actual setup
9 import setuptools
5 import setuptools
10 execfile('setup.py')
6 execfile('setup.py')
11
12 # clean up the junk left around by setuptools
13 if "develop" not in sys.argv:
14 try:
15 shutil.rmtree('ipython.egg-info')
16 except:
17 try:
18 os.unlink('ipython.egg-info')
19 except:
20 pass
General Comments 0
You need to be logged in to leave comments. Login now