##// END OF EJS Templates
removed images.py dependence in Ipython_history.py.
removed images.py dependence in Ipython_history.py.

File last commit:

r854:0d487867
r935:2cc23ba8
Show More
exesetup.py
106 lines | 3.3 KiB | text/x-python | PythonLexer
vivainio
experimental exesetup.py for py2exe
r665 #!/usr/bin/env python
# -*- coding: utf-8 -*-
vivainio
exesetup doc changes
r701 r"""Setup script for exe distribution of IPython (does not require python).
vivainio
experimental exesetup.py for py2exe
r665
- Requires py2exe
vivainio
correct mistake in exesetup.py docstring (pyreadline installation)
r673 - install pyreadline *package dir* in ipython root directory by running:
vivainio
experimental exesetup.py for py2exe
r665
vivainio
only set readline startup hook if available
r700 svn co http://ipython.scipy.org/svn/ipython/pyreadline/branches/maintenance_1.3/pyreadline/
wget http://ipython.scipy.org/svn/ipython/pyreadline/branches/maintenance_1.3/readline.py
OR (if you want the latest trunk):
vivainio
correct mistake in exesetup.py docstring (pyreadline installation)
r673 svn co http://ipython.scipy.org/svn/ipython/pyreadline/trunk/pyreadline
vivainio
experimental exesetup.py for py2exe
r665
- Create the distribution in 'dist' by running "python exesetup.py py2exe"
- Run ipython.exe to go.
"""
#*****************************************************************************
# Copyright (C) 2001-2005 Fernando Perez <fperez@colorado.edu>
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#*****************************************************************************
# Stdlib imports
import os
import sys
from glob import glob
# A few handy globals
isfile = os.path.isfile
pjoin = os.path.join
from distutils.core import setup
vivainio
copy bin/ in exesetup.py for ipykit
r797 from distutils import dir_util
vivainio
experimental exesetup.py for py2exe
r665 import py2exe
# update the manuals when building a source dist
# Release.py contains version, authors, license, url, keywords, etc.
execfile(pjoin('IPython','Release.py'))
# A little utility we'll need below, since glob() does NOT allow you to do
# exclusion on multiple endings!
def file_doesnt_endwith(test,endings):
"""Return true if test is a file and its name does NOT end with any
of the strings listed in endings."""
if not isfile(test):
return False
for e in endings:
if test.endswith(e):
return False
return True
vivainio
ipy_kitcfg is used for ipykit setup, 'bin' folder should contain various needed binaries
r704 egg_extra_kwds = {}
vivainio
experimental exesetup.py for py2exe
r665
# Call the setup() routine which does most of the work
setup(name = name,
options = {
vivainio
exesetup.py: remove tk, wx to avoid bloat
r675 'py2exe': {
vivainio
bunch of modules to ignore in exesetup.py
r842 'packages' : ['IPython', 'IPython.Extensions', 'IPython.external',
'pyreadline'],
'excludes' : ["Tkconstants","Tkinter","tcl",'IPython.igrid','wx',
'wxPython','igrid', 'PyQt4', 'zope', 'Zope', 'Zope2',
vivainio
ipykit improvements (built in Sc1 setup etc.)
r854 '_curses','enthought.traits','gtk','qt', 'pydb','idlelib',
]
vivainio
exesetup.py: remove tk, wx to avoid bloat
r675
vivainio
experimental exesetup.py for py2exe
r665 }
},
version = version,
description = description,
long_description = long_description,
author = authors['Fernando'][0],
author_email = authors['Fernando'][1],
url = url,
download_url = download_url,
license = license,
platforms = platforms,
keywords = keywords,
vivainio
ipykit.py special launcher, 'py' alias within ipy_kitcfg
r798 console = ['ipykit.py'],
vivainio
experimental exesetup.py for py2exe
r665
# extra params needed for eggs
**egg_extra_kwds
)
vivainio
exesetup.py: remove tk, wx to avoid bloat
r675
vivainio
ipython_firstrun(ip) entry point for _ip.load, ipykit enhancement: pylaunchers for launching python scripts
r801 minimal_conf = """
import IPython.ipapi
ip = IPython.ipapi.get()
vivainio
ipykit improvements (built in Sc1 setup etc.)
r854 ip.load('ipy_kitcfg')
import ipy_profile_sh
vivainio
ipython_firstrun(ip) entry point for _ip.load, ipykit enhancement: pylaunchers for launching python scripts
r801 """
vivainio
ipy_kitcfg is used for ipykit setup, 'bin' folder should contain various needed binaries
r704 if not os.path.isdir("dist/_ipython"):
print "Creating simple _ipython dir"
os.mkdir("dist/_ipython")
open("dist/_ipython/ipythonrc.ini","w").write("# intentionally blank\n")
vivainio
ipython_firstrun(ip) entry point for _ip.load, ipykit enhancement: pylaunchers for launching python scripts
r801 open("dist/_ipython/ipy_user_conf.py","w").write(minimal_conf)
vivainio
copy bin/ in exesetup.py for ipykit
r797 if os.path.isdir('bin'):
vivainio
ipykit improvements (built in Sc1 setup etc.)
r854 dir_util.copy_tree('bin','dist/bin')