[Distutils] ..\setup.py relative invocation (was: [issue108] develop install fails if path to setup.py is relative)
P.J. Eby
pje at telecommunity.com
Sun May 9 19:28:15 CEST 2010
At 03:21 PM 5/9/2010 +0300, anatoly techtonik wrote:
>setup.py fails miserably when invoked using relative path, i.e.
>`python ../../setup.py ...`. In this case it attempts to look up
>referenced files in current directory - not in its own dir.
>
>What is it needed for?
The distutils were simply written with the assumption that that's how
things are... and there were never any tests that did otherwise. As
a result, there's lots of code that simply operates on relative
paths, beginning from the relative paths that are provided by setup().
>Does distutils2 fix this?
>
>I ask, because it adds another "save cwd;cd;...;restore cwd" yak
>shaving wrapper to development process, and the error message for
>failure is not very intuitive.
FWIW, you can always use "easy_install path/to/directory", if you're
just going to be running an install. I don't know if pip will wrap
in this way, but it seems to me there was also a buildutils or some
such package floating around a few years ago that included a simple
command for running setup scripts with different interpreters, in any
directory, etc.
More information about the Distutils-SIG
mailing list