[Nix-dev] Re: New `buildPythonPackage' function
Ludovic Courtès
ludo at gnu.org
Thu May 28 16:52:23 CEST 2009
Hi Marc,
Marc Weber <marco-oweber at gmx.de> writes:
> Have a look at pkgs/development/interpreters/python-new/2.5/default.nix
> It looks like this :
>
> soappy = t.pythonLibSetup.merge {
> name = "soappy-0.12";
> pyCheck = "from SOAPpy import WSDL";
> [ .. ]
> };
>
> It's a simple sanity check failing if the packages which the expression
> should provide can't be loaded.
The `buildPythonPackage' tries runs "python setup.py test" by default,
which in most cases runs a test suite. It should be a good sanity
check.
> Why might this be benefical? Because if you add a lib depending on
> another it might do that import check in its configure script. And
> patching the configure scripts is ugly (IMHO)..
The easy_install(1) command does the right thing in that respect. If it
cannot find a dependency, it tries to automatically download it from the
web, which simply fails in a Nix chroot.
Thanks,
Ludo'.
More information about the nix-dev
mailing list