[Distutils] obtaining easy_install prefix in setup.py

David Cournapeau david at ar.media.kyoto-u.ac.jp
Thu Nov 19 06:52:51 CET 2009


Pavol Juhas wrote:
> easy_install already creates its own distribution object
> before sourcing pkgfoo/setup.py, in addition setup.py
> is executed in a sandbox with mangled sys.argv.
>   

At least for the Distribution class, what you can do is to detect
whether you are run under setuptools/easy_install or not, and
conditionally inherit from there. I don't know if it is enough to get
--prefix from easy_install - I never use easy_install.

David


More information about the Distutils-SIG mailing list