Re: Using Py_SetPythonHome

Jan Kratochvil
2012-10-03T15:13:07Z

On Tue, 02 Oct 2012 15:08:54 +0200, Joel Brobecker wrote:
> And to me, this is not violating "standard system
> packagainng practices" (please point me to a document that would claim
> to explain what the standard practices are),

I follow
http://fedoraproject.org/wiki/Packaging:Guidelines
http://fedoraproject.org/wiki/Packaging:Guidelines#Beware_of_Rpath
which is sure Fedora specific but in this part it can be considered as
a general GNU/Linux behavior, I am willing to discuss packaging guidelines of
other distros.

> but providing a very
> important feature, which, if not standard, definitely should be (IMO).

I really do not say anything whether this feature should be standard or not.
Maybe it should be standard, indeed. That is completely offtopic here.

Show me any common GNU/Linux distro with >= 1% of packages using this feature.
There is not any. Which proves to me it is not a standard feature.

If it should be a standard feature:
* These relocation functions should be moved as a GNU extension to glibc.
* GNU Coding Standards should be extended for it.
* etc.
I do not see any attempt to do this part, which is what I find inappropriate
on this feature.

> If I have built a tool somewhere with a given prefix, and then I want
> to install a copy somewhere else, it would be a real pain in the neck
> to have to rebuild it.

There already exist various methods to deal with it, a standardized one is
/usr/sbin/alternatives (chkconfig package) which requires no specific upstream
support from a package. Then there are per-package hacks like ENV variables
documented in a man page but they are still more clear than this surprising
relocation.

> Going back to the actual subject of this discussion, would it cause
> a problem to call Py_SetPythonHome in your situation where everything
> is static and installed at the default location?

Yes, it is a problem because 99.9% of other Python-using packages behave
differently.

Thanks,
Jan