On Wed, 18 Nov 2009 14:59:21 -0500, Pavol Juhas <pj2...@columbia.edu> wrote: > Hello, > > I searched and read the recent discussions on the distutils-sig > list and I hope someone can help me with the following problem. > > Is there a way to recover the prefix value inside pkgfoo/setup.py, > when it is installed as > > easy_install --prefix=value pkgfoo > (pkgfoo is a directory with setup.py) > > I can get the prefix, when pkgfoo is installed with > > python setup.py install --prefix=value > > by overloading the bdist_egg class and passing it via > cmdclass argument to the setup function: > > http://danse.us/trac/diffraction/browser/diffraction/diffpy.lib/trunk/setup.py > http://danse.us/trac/diffraction/browser/diffraction/diffpy.lib/trunk/setup_scons.py > > However, this does not work under easy_install, because > 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. > > Has anybody, perhaps David Cournapeau, figured out how to wrestle > the prefix value out of easy_install? > > Thank you all,
Hi Pavol, Is this only for the linux/mac version? I tried the windows version of diffpy and it uses a nsis installer and that all seemed to work fine on my test machine. So, you want to find the "full path" of the install directory for post install processing? (using non-distutils installation terminology) I'm sure somebody will correct me, but it is possible to get the exact install directory from setuptools using the a workingset api call. But I've never tried integrating that into a setup call in setup.py but I'm wondering if that is the sort of thing that you're after? David _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig