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

Peter Simons simons at cryp.to
Mon Jan 12 16:09:18 CET 2009


Hi Marc,

 > libA requires libB. If you install libA into ~/.nix-profile/ it will
 > be broken.

I can think of the following possible solutions to this problem:

 (a) we don't care. The installation process might detect the missing
     dependency and it might warn the user, but ultimately it's the
     users decision how to remedy the situation.

 (b) Patch libA to extend "sys.path" as required before trying to import
     libB. It's not pretty -- particularly if libA consists of a large
     number of individual files --, but it does solve the problem and
     requires no user action whatsoever.

 (c) Have libA create a file $out/etc/profile.d/libA.sh that sets
     PYTHONPATH to include libB. This solution is rather non-intrusive
     and lightweight, but it does require the user to source those
     profiles to ensure that her environment is set up correctly.


 > Anyway I won't remvoe the *old* version at this point in time then.
 > That was what i really wanted to know.

This nomenclature confuses me. Referring to the established Python
expression as "old" seems to imply that this expression exists mostly
for the sake of backwards compatibility, i.e. that it has been
superseded by your "new" expression. It's not obvious to me that this is
the case. I am thrilled to see innovative work being done to improve
Python support in Nix, particularly since these innovations address
problems that exist in other packages too. GHC, anyone? However, I am
not thrilled to have two completely different expressions for Python. As
far as I'm concerned, there should be *one* package for Python, ideally
one that combines the best features of the established and of the
experimental package.

Take care,
Peter




More information about the nix-dev mailing list