[Nix-dev] Re: May I remove the old python code?

Peter Simons simons at cryp.to
Thu Jan 8 21:09:18 CET 2009


Hi Marc,

 > Using PYHTONPATH is not enough because it doesn't make python read
 > the .pth files telling python where to find additional modules.

this statement doesn't seem to make sense. ${PYTHONPATH} is used to find
the installed modules. When a module is listed in that variable, it *is*
found. My understanding is that *.pth files are Python's native
mechanism for computing the proper setting for ${PYTHONPATH}. If
${PYTHONPATH} is set correctly, however, the *.pth files aren't needed.
Now, all the information we need is available in the Nix package
description -- Nix *can* compute a proper ${PYTHONPATH}. The addition of
${NIX_PYTHON_SITES} feels unnecessary to me.

Besides, I am really not fond of the fact that the new Python expression
contains the to-be-installed Python modules. That logic is wrong: Those
modules ought to reference Python, not the other way round. For the sake
of an example, just consider the notion that all possible C libraries
would be listed inside of the GCC expression! That's just not right. How
is this approach going to scale when someone releases, say, a competing
Python interpreter? Are we going to duplicate those library expressions?

Take care,
Peter




More information about the nix-dev mailing list