Matt Good wrote: > On Mon, 2006-10-16 at 16:57 -0400, Pierre Imbaud wrote: > >>I just discovered scripts dont get installed directly (in >>/usr/local/bin), instead a wrapper in installed, that calls the >>script. So an extra file is involved, and extra code, every time the >>script is called. Makes some overhead, and it breaks a simple >>mechanism I use: my script is able to perform many actions, based on >>its name (much like cp, mv and ln are the same executable). at >>install, I need to make symlinks to the script, one per action, and >>this was automated: this is broken by the wrapping. No big deal, just >>makes things less simple. > > > Actually installing scripts with setuptools is very easy: > http://peak.telecommunity.com/DevCenter/setuptools#automatic-script-creation > > In your entry points simply put the names of the scripts you want and > the Python function that script will run. Now you don't need to do your > own symlink hack to get it all to work. Just put the functions into a > Python module and list them in setup.py. works fine, indeed. problem was I already had this set of functions, but with some general processing before functions get called (for arguments, for instance): Had to dismantle all this to adopt this new policy.
> > The setuptools method also fixes problems with making scripts work in a > cross-platform manner, makes sure your scripts work correctly if someone > installs two versions of the same package on their system, and ensures > that scripts are run with the correct Python version in case it's not > the default Python executable on the system. > granted. _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig