Permalink
Browse files

Make ipython-qtconsole a GUI script in setuptools.

  • Loading branch information...
1 parent db78130 commit 87eb19d6244a510a9426604b9e5a9b3b324e307c Evan Patterson committed May 9, 2011
Showing with 24 additions and 6 deletions.
  1. +4 −2 setup.py
  2. +20 −4 setupbase.py
View
@@ -58,6 +58,7 @@
find_packages,
find_package_data,
find_scripts,
+ find_gui_scripts,
find_data_files,
check_for_dependencies,
record_commit_info,
@@ -211,7 +212,8 @@ def cleanup():
if 'setuptools' in sys.modules:
setuptools_extra_args['zip_safe'] = False
setuptools_extra_args['entry_points'] = {
- 'console_scripts': find_scripts(True)
+ 'console_scripts': find_scripts(True),
+ 'gui_scripts': find_gui_scripts(True),
}
setup_args['extras_require'] = dict(
parallel = 'pyzmq>=2.1.4',
@@ -245,7 +247,7 @@ def cleanup():
# check for dependencies an inform the user what is needed. This is
# just to make life easy for users.
check_for_dependencies()
- setup_args['scripts'] = find_scripts(False)
+ setup_args['scripts'] = find_scripts(False) + find_gui_scripts(False)
#---------------------------------------------------------------------------
# Do the actual setup now
View
@@ -267,12 +267,10 @@ def find_scripts(entry_points=False):
return setuptools entry_point-style definitions
else:
return file paths of plain scripts [default]
-
"""
if entry_points:
scripts = [
'ipython = IPython.frontend.terminal.ipapp:launch_new_instance',
- 'ipython-qtconsole = IPython.frontend.qt.console.ipythonqt:main',
'pycolor = IPython.utils.PyColorize:main',
'ipcontroller = IPython.parallel.apps.ipcontrollerapp:launch_new_instance',
'ipengine = IPython.parallel.apps.ipengineapp:launch_new_instance',
@@ -290,12 +288,30 @@ def find_scripts(entry_points=False):
pjoin(parallel_scripts, 'ipcluster'),
pjoin(parallel_scripts, 'iplogger'),
pjoin(main_scripts, 'ipython'),
- pjoin(main_scripts, 'ipython-qtconsole'),
pjoin(main_scripts, 'pycolor'),
pjoin(main_scripts, 'irunner'),
pjoin(main_scripts, 'iptest')
- ]
+ ]
+ return scripts
+
+def find_gui_scripts(entry_points=False):
+ """Find IPython's GUI scripts.
+ if entry_points is True:
+ return setuptools entry_point-style definitions
+ else:
+ return file paths of plain scripts [default]
+ """
+ if entry_points:
+ scripts = [
+ 'ipython-qtconsole = IPython.frontend.qt.console.ipythonqt:main',
+ ]
+ else:
+ parallel_scripts = pjoin('IPython','parallel','scripts')
+ main_scripts = pjoin('IPython','scripts')
+ scripts = [
+ pjoin(main_scripts, 'ipython-qtconsole'),
+ ]
return scripts
#---------------------------------------------------------------------------

0 comments on commit 87eb19d

Please sign in to comment.