[Nix-dev] python packages and dependencies
Florian Friesdorf
flo at chaoflow.net
Mon Feb 20 05:59:56 CET 2012
On Mon, 16 Jan 2012 11:18:30 +0100, Cillian de Róiste <cillian.deroiste at gmail.com> wrote:
> On Wed, Sep 21, 2011 at 10:09 PM, Peter Simons <simons at cryp.to> wrote:
> > Hi Florian,
> >
> > > buildPythonPackage happily fetches all dependency of a package defined in
> > > setup.py. The dependencies in there are not necessarily fixed to a
> > > specific version. Therefore, it's not guaranteed that one and the same
> > > nix expression produces the same derivation. How is this handled?
> >
> > I have noticed that, too, and I'm not about that "feature" either. I assume
> > that there is a way (command-line flag) to tell 'distutils' to disable
> > network access? Does anyone know how to do that?
>
> Florian and I were discussing this again the other day and found that
> there is a convenient way to do this (patch attached), by setting
> allow_hosts=None in a system distutils.cfg. It's interesting that this
> will not effect a virtualenv which means that someone could still use
> easy_install from a virtualenv and dependencies would be resolved in
> the usual way. I have tested the equivalent setup.cfg file and it has
> the desired effect, but I didn't test the patch enough yet to verify
> that it works as expected. Just to be clear, the builder doesn't need
> to call easy_install explicitly for this setting to be applied, it is
> also used when running e.g. `python setup.py test` in a package which
> imports setuputils, which would otherwise download and install the
> requirements.
>
> http://packages.python.org/distribute/easy_install.html#restricting-downloads-with-allow-hosts
to close this thread - the approach entered the current patchset, but
instead of patching the "system" distutils, I introduced a patched
python-offline-distutils that is inserted into PYTHONPATH for
buildPythonPackage.
thx a lot!
--
Florian Friesdorf <flo at chaoflow.net>
GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo at chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120220/ba9e2ce1/attachment.bin
More information about the nix-dev
mailing list