Skip to content
This repository

Make ipython-qtconsole a GUI script #422

Merged
merged 2 commits into from about 3 years ago

2 participants

Evan Patterson Min RK
Evan Patterson
Collaborator

The 'ipython-qtconsole' script is now configured as a GUI script in setuptools.

This only really matters on Windows: it ensures that pythonw is used for the script. This is not a big deal for developers but is a good thing to have for the 0.11 release, I think.

Min RK
Owner
minrk commented

I see no problem with this other than possibly the copying of find_scripts to find_gui_scripts. Our setup code for finding packages and scripts is ludicrously complicated at this point, resulting in the just about every new package or script not being properly installed under some circumstances for weeks or months after being added. Maybe implement this inside one find_scripts method that returns:

if entry_points:
    return {'console_scripts' : [cscripts], 'gui_scripts' : [gscripts]}}
else:
    return [allscripts]

So we can just do:

setuptools_extra_args['entry_points'] = find_scripts(True)
#...
 setup_args['scripts'] = find_scripts(False)
Evan Patterson
Collaborator

Yes, that is better. Will do when I get a chance.

Evan Patterson
Collaborator

@minrk
Look good?

Min RK
Owner
minrk commented

yes, great. Go ahead and merge.

Evan Patterson epatters merged commit c2b156d into from
Evan Patterson epatters closed this
Brian E. Granger ellisonbg referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Damián Avila damianavila referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.

Showing 2 changed files with 7 additions and 8 deletions. Show diff stats Hide diff stats

  1. +1 3 setup.py
  2. +6 5 setupbase.py
4 setup.py
@@ -210,9 +210,7 @@ def cleanup():
210 210
211 211 if 'setuptools' in sys.modules:
212 212 setuptools_extra_args['zip_safe'] = False
213   - setuptools_extra_args['entry_points'] = {
214   - 'console_scripts': find_scripts(True)
215   - }
  213 + setuptools_extra_args['entry_points'] = find_scripts(True)
216 214 setup_args['extras_require'] = dict(
217 215 parallel = 'pyzmq>=2.1.4',
218 216 zmq = 'pyzmq>=2.0.10.1',
11 setupbase.py
@@ -267,12 +267,10 @@ def find_scripts(entry_points=False):
267 267 return setuptools entry_point-style definitions
268 268 else:
269 269 return file paths of plain scripts [default]
270   -
271 270 """
272 271 if entry_points:
273   - scripts = [
  272 + console_scripts = [
274 273 'ipython = IPython.frontend.terminal.ipapp:launch_new_instance',
275   - 'ipython-qtconsole = IPython.frontend.qt.console.ipythonqt:main',
276 274 'pycolor = IPython.utils.PyColorize:main',
277 275 'ipcontroller = IPython.parallel.apps.ipcontrollerapp:launch_new_instance',
278 276 'ipengine = IPython.parallel.apps.ipengineapp:launch_new_instance',
@@ -281,6 +279,10 @@ def find_scripts(entry_points=False):
281 279 'iptest = IPython.testing.iptest:main',
282 280 'irunner = IPython.lib.irunner:main'
283 281 ]
  282 + gui_scripts = [
  283 + 'ipython-qtconsole = IPython.frontend.qt.console.ipythonqt:main',
  284 + ]
  285 + scripts = dict(console_scripts=console_scripts, gui_scripts=gui_scripts)
284 286 else:
285 287 parallel_scripts = pjoin('IPython','parallel','scripts')
286 288 main_scripts = pjoin('IPython','scripts')
@@ -294,8 +296,7 @@ def find_scripts(entry_points=False):
294 296 pjoin(main_scripts, 'pycolor'),
295 297 pjoin(main_scripts, 'irunner'),
296 298 pjoin(main_scripts, 'iptest')
297   - ]
298   -
  299 + ]
299 300 return scripts
300 301
301 302 #---------------------------------------------------------------------------

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.