On Fri, Dec 04, 2009 at 19:34 -0500, Nikolaus Rath wrote: > All my Python files have extension .py. However, I would like to install > scripts that are meant to be called by the user without the suffix, i.e. > the file scripts/doit.py should end up as /usr/bin/doit.
> Apparently the scripts= option of the setup() function does not support > this directly. Is there a clever way to get what I want? Just name the file you want to install 'doit' and not 'doit.py'. That would be the easiest way. You might run into problems on Windows though, which IIRC (it's been a while) heavily relies on file suffixes and not on their content. That might have changed in the last 10 years though, so better check that first. You can also use entry points to create the executable at install time. Have a look at [1] which explains how this is done. This requires using Distribute/setuptools though, ... [1] http://packages.python.org/distribute/setuptools.html#automatic-script-creation -- .''`. Wolodja Wentland <wentl...@cl.uni-heidelberg.de> : :' : `. `'` 4096R/CAF14EFC `- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
signature.asc
Description: Digital signature
-- http://mail.python.org/mailman/listinfo/python-list