[Distutils] Can't get "development mode" work as I like it

P.J. Eby pje at telecommunity.com
Fri Jul 9 19:13:49 CEST 2010


At 05:43 PM 7/9/2010 +0200, Hartmut Goebel wrote:
>Hi,
>
>I'm used to develop and test from within a single project-directory,
>without any staging area, etc. As long as I did use scripts, this worked
>very well. But when switching to pkg_resources entry-points, I get
>problems: Now I need to ask easy_install (or setup.py develop ...) to
>create the "scripts" for me.
>
>Running
>
>   python setup.py develop --install-dir . --script-dir .
>
>gives an "error: bad install directory or PYTHONPATH" since the current
>directory is not in PYTHONPATH.

Installation to the current directory isn't supported, as it's rather 
a bad idea (for one thing, you could accidentally overwrite something).

My suggestion would be:

    mkdir bin
    python setup.py develop -md bin
    bin/scriptname (to run a script)

Notice that the use of the -m flag means that the 'bin' directory 
doesn't have to be on PYTHONPATH for this to work.  There will simply 
be an .egg-link file placed there, along with your scripts.



More information about the Distutils-SIG mailing list