pypa / setuptools

Official project repository for the Setuptools build system
https://pypi.org/project/setuptools/
MIT License
2.5k stars 1.19k forks source link

The gui_scripts entry point should use "pythonw" #410

Open ghost opened 9 years ago

ghost commented 9 years ago

Originally reported by: Anonymous


There is a long tradition of python having a "pythonw", used to run scripts / programs that use the Windowing system.

On most *nix systems, pythonw is a no-op, aliased to the same executable.

On Windows, I've lost track, but I think it is different.

On the Mac, GUI programs need to be run from a properly defined application package. So there is a "python", and "pythonw". However, for years (and many versions) the python.org build of python has made pythonw aliased to python, so it's a non-issue there.

But the Anaconda build of python DOES have a distinct python and pythonw, and homebrew or macports may also.

So, unless pythonw has been officially deprecated, then setuptools should support it.

This will probably be as simple as changing the shebang line in the generated launch scripts to use "pythonw" for gui_script entry points.


ghost commented 8 years ago

Original comment by chrishbarker (Bitbucket: chrishbarker, GitHub: Unknown):


If some systems don't have a pythonw (sigh -- they should, if it's just a link) then setuptools would need a bit of platform dependent code that puts in "pythonw" on OS-X (and maybe Windows) and regular old "python" on *nix. the scripts entry points are platform dependent already, this should not be a heavy lift.

ghost commented 9 years ago

Original comment by arfrever (Bitbucket: arfrever, GitHub: arfrever):


Build system of CPython does not install any "pythonw" on Unix non-Mac systems (e.g. GNU/Linux) (and on Mac systems when --disable-framework was passed to configure of CPython).