[Distutils] Improving distutils' script and GUI app handling

Phillip J. Eby pje at telecommunity.com
Fri Sep 23 17:46:28 CEST 2005


At 03:07 PM 9/23/2005 +0200, Thomas Heller wrote:
>Paul Moore <p.f.moore at gmail.com> writes:
>
> > On 9/17/05, Phillip J. Eby <pje at telecommunity.com> wrote:
> >> However, after reflection, I think now that -m probably only really makes
> >> sense for stdlib modules, since projects using setuptools can now get all
> >> the benefits of -m without any of the drawbacks, without even writing any
> >> __name__=='__main__' code.
> >
> > One thing you get with -m is that the module doesn't have to be on
> > PATH. Where does setuptools install its wrapper executables? (The
> > usual \Python24\Scripts directory isn't added to PATH by the
> > installer).
> >
> > I know, I'm nitpicking. Sorry :-)
>
>No, you're not. IMO.  setuptools installs them in PythonXY\Scripts.

Unless you set --install-scripts somewhere else, which you can do in a 
configuration file.  To the greatest extent possible, I'm trying to have 
setuptools minimize surprises with respect to installation locations, by 
conforming to the active distutils configuration.


>BTW: Shouldn't 'setup.py develop --uninstall' remove them again? It
>doesn't.

setuptools has hardly any uninstallation capabilities as yet.



>And yet another question: How should my setup-script start? Is this the
>correct way:
>
>"""
>from ez_setup import use_setuptools
>use_setuptools()
>
>from distutils.core import setup

It's a way that works.  I personally use 'from setuptools import setup' and 
whatever else I need to import, but whatever you prefer is 
fine.  setuptools patches itself into the distutils core.  It used to not 
do that, but then I realized that the way py2exe and other distutils 
extensions patch themselves in, you would lose setuptools functionality 
unless I patched myself in also.  Hopefully in future everybody will use 
setuptools' extension functionality so that patching will be unnecessary.



More information about the Distutils-SIG mailing list