[vtk-developers] python install prefix in setup.py
Prabhu Ramachandran
prabhu_r at users.sf.net
Fri Feb 3 05:48:15 EST 2006
>>>>> "David" == David Gobbi <dgobbi at atamai.com> writes:
David> Prabhu Ramachandran wrote:
>> distros. Debian basically adds the local prefix to site.py.
[...]
David> Does debian have any way of telling distutils of the new
David> location? If we are using setup.py to install the python
David> modules, then it seems that our default location should be
David> the same as the one used by setup.py (otherwise, why would
David> we use setup.py at all wh
Not that I know of but this could be used:
import site
print site.prefixes
import sys
print sys.path
>> I am not sure that David's approach is *the* optimal one. Many
>> VTK users are unlikely to have root access therefore installing
>> to /usr/ is entirely out of question. In these cases it is
>> best to do what is currently done -- install to CMAKE_PREFIX.
>> Basically the install should work for most common situations.
>>
>>
David> I disagree that we should install to
David> ${CMAKE_PREFIX}/lib/pythonx.x/site-packages, as is
David> currently done. It might make sense to install in
David> ${CMAKE_PREFIX}/lib/vtkx.x/python
${CMAKE_PREFIX}/lib/vtkx.y/python is completely non-standard. No
Python module ever installs importable Python modules in
lib/libname/python. Any normal distutils based Python package is
installed like so:
python setup.py install --prefix=$pth
and everything is installed in
$pth/lib/site-packages/pythonx.y/package
$pth/bin/script.py
The alternative is
python setup.py install --home=$pth
In which case the files are installed in
$pth/lib/python/package
$pth/bin
So, that is the default behavior of distutils. What are you
suggesting?
David> The "make install" should work out-of-the-box for as many
David> python users as possible. Right now, it only works
David> "out-of-the-box" for Redhat users that are installing VTK
David> in /sys or for Debian users who are installing VTK in
David> /usr/local. Everyone else needs to set the PYTHONPATH
David> befor it will work.
Everyone else needs to set PYTHONPATH anyway to get any possible
option working unless they are the super user and can install into
sys.prefix or /usr/local (on more fortunate distros).
David> We can do much better than that!
Yes but I'm not quite clear what you want to do and how you want to do
it.
cheers,
prabhu
More information about the vtk-developers
mailing list