Show More
@@ -0,0 +1,93 b'' | |||
|
1 | #!/usr/bin/env python | |
|
2 | # -*- coding: utf-8 -*- | |
|
3 | """Setup script for exe distribution of IPython (does not require python). | |
|
4 | ||
|
5 | - Requires py2exe | |
|
6 | ||
|
7 | - install pyreadline in ipython root directory by running: | |
|
8 | ||
|
9 | svn co http://ipython.scipy.org/svn/ipython/pyreadline/trunk pyreadline | |
|
10 | ||
|
11 | - Create the distribution in 'dist' by running "python exesetup.py py2exe" | |
|
12 | ||
|
13 | - Run ipython.exe to go. | |
|
14 | ||
|
15 | """ | |
|
16 | ||
|
17 | #***************************************************************************** | |
|
18 | # Copyright (C) 2001-2005 Fernando Perez <fperez@colorado.edu> | |
|
19 | # | |
|
20 | # Distributed under the terms of the BSD License. The full license is in | |
|
21 | # the file COPYING, distributed as part of this software. | |
|
22 | #***************************************************************************** | |
|
23 | ||
|
24 | # Stdlib imports | |
|
25 | import os | |
|
26 | import sys | |
|
27 | ||
|
28 | from glob import glob | |
|
29 | ||
|
30 | ||
|
31 | # A few handy globals | |
|
32 | isfile = os.path.isfile | |
|
33 | pjoin = os.path.join | |
|
34 | ||
|
35 | from distutils.core import setup | |
|
36 | import py2exe | |
|
37 | ||
|
38 | # update the manuals when building a source dist | |
|
39 | # Release.py contains version, authors, license, url, keywords, etc. | |
|
40 | execfile(pjoin('IPython','Release.py')) | |
|
41 | ||
|
42 | # A little utility we'll need below, since glob() does NOT allow you to do | |
|
43 | # exclusion on multiple endings! | |
|
44 | def file_doesnt_endwith(test,endings): | |
|
45 | """Return true if test is a file and its name does NOT end with any | |
|
46 | of the strings listed in endings.""" | |
|
47 | if not isfile(test): | |
|
48 | return False | |
|
49 | for e in endings: | |
|
50 | if test.endswith(e): | |
|
51 | return False | |
|
52 | return True | |
|
53 | ||
|
54 | ||
|
55 | if 'setuptools' in sys.modules: | |
|
56 | # setuptools config for egg building | |
|
57 | egg_extra_kwds = { | |
|
58 | 'entry_points': { | |
|
59 | 'console_scripts': [ | |
|
60 | 'ipython = IPython.ipapi:launch_new_instance', | |
|
61 | 'pycolor = IPython.PyColorize:main' | |
|
62 | ]} | |
|
63 | } | |
|
64 | scriptfiles = [] | |
|
65 | # eggs will lack docs, examples XXX not anymore | |
|
66 | #datafiles = [('lib', 'IPython/UserConfig', cfgfiles)] | |
|
67 | else: | |
|
68 | egg_extra_kwds = {} | |
|
69 | ||
|
70 | ||
|
71 | # Call the setup() routine which does most of the work | |
|
72 | setup(name = name, | |
|
73 | options = { | |
|
74 | 'py2exe': { | |
|
75 | 'packages' : ['IPython', 'IPython.Extensions', 'IPython.external','pyreadline'], | |
|
76 | } | |
|
77 | }, | |
|
78 | version = version, | |
|
79 | description = description, | |
|
80 | long_description = long_description, | |
|
81 | author = authors['Fernando'][0], | |
|
82 | author_email = authors['Fernando'][1], | |
|
83 | url = url, | |
|
84 | download_url = download_url, | |
|
85 | license = license, | |
|
86 | platforms = platforms, | |
|
87 | keywords = keywords, | |
|
88 | packages = ['IPython', 'IPython.Extensions', 'IPython.external'], | |
|
89 | console = ['ipython.py'], | |
|
90 | ||
|
91 | # extra params needed for eggs | |
|
92 | **egg_extra_kwds | |
|
93 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now