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

Ludovic Courtès ludo at gnu.org
Wed Jan 7 19:32:46 CET 2009


Hi,

"Andres Loeh" <andres.loeh at googlemail.com>
writes:

> Ludo, while I have no idea about the actual implementation used for the new
> python, I think that installing language libraries via nix-env and
> solely relying
> on ad-hoc composition in the user environment cannot in general work reliably.

What makes you say so?

I can think of two typical cases:

  1. Building a Python library that depends on another Python library.
     The user environment is not involved here.  Python's `setup-hook'
     can help, and `makeWrapper' or similar can also be used to ensure
     that the Python library depended on is in the `PYTHONPATH'.

  2. Installing a Python library in the user's environment.  This is
     only useful for developers working on a project that uses said
     library.  In that case, the user has to put
     `~/.nix-profile/lib/python2.5/site-packages' in their `PYTHONPATH'
     anyway.

I think both cases are easily handled.  The second case (having to
modify `PYTHONPATH') is something users (really: developers) are used
to, unlike having to fiddle with some obscure options in
`~/.nixpkgs/config.nix'.

(Of course, "Python" can be replaced by "Perl", "Guile", "Emacs", etc.,
and this still holds.)

Thanks,
Ludo'.




More information about the nix-dev mailing list