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

Ludovic Courtès ludo at gnu.org
Mon Jan 12 14:16:49 CET 2009


Hello,

Marc Weber <marco-oweber at gmx.de> writes:

>  
>> This tells you why PYTHONPATH is *not* enough. I've spend about a week writing
>> all this stuff and I didn't find a better solution. PYTHONPATH not working has
>> forced me starting to write this.
>
> Tongiht I remembered another point:
> Consider this dependency chain:
>
> libA requires libB
>
> if you install libA into ~/.nix-profile/ it will be broken.

You're right: in that case, the user has to know that both libA and libB
must be installed in their environment, which may not be obvious.

OTOH, such users are, again, developers, it could be considered
reasonable to expect them to do the right thing here.

Applications don't have this problem, provided some `makeWrapper'
trickery is used to set up `PYTHONPATH'.  However, the wrapper needs to
know all the dependencies of the applications, including indirect
dependencies, which isn't convenient.

For instance, the expression for Castle Combat has to add some indirect
dependencies (propagated build inputs) to create an appropriate wrapper.
This sucks because the Castle Combat expression must know its indirect
dependencies, and must be changed if the set of indirect dependencies
happens to change.

So you're right, there's room for improvement.  However, I still find it
questionable to have to tell the Python expression which libraries you'd
like to install.

Thanks,
Ludo'.




More information about the nix-dev mailing list