[Nix-dev] python2nix not working

Rok Garbas rok at garbas.si
Fri Sep 30 14:09:31 CEST 2016


with pypi2nix this worked for me:

% pypi2nix -V 2.7 -e wptools -E "curl curl.dev libxml2 libxslt openssl" -v
% cat > requirements_override.nix << EOF
{ pkgs, python }:
self: super: {
  "lxml" = python.overrideDerivation super."lxml" (old: {
    propagatedBuildInputs = [];
  });
  "pycurl" = python.overrideDerivation super."pycurl" (old: {
    preConfigure = ''
      substituteInPlace setup.py --replace '--static-libs' '--libs'
      export PYCURL_SSL_LIBRARY=openssl
    '';
  });
}
EOF
% nix-build requirements.nix -A interpreter
% ./result/bin/python -c 'import wptools; wptools.page("Flannery Connor")'
Flannery_Connor (en)
{
  lang: en
  title: Flannery_Connor
}





On Fri, Sep 30, 2016 at 11:33 AM, Domen Kožar <domen at dev.si> wrote:
> python2nix is outdated. Older pip needs to be used in order to work. I'll
> mark it as broken for now.
>
> On Thu, Sep 29, 2016 at 10:28 PM, Tomasz Czyż <tomasz.czyz at gmail.com> wrote:
>>
>> I'm not sure if python2nix is maintainer,
>>
>> but check this https://garbas.si/2016/pypi2nix-reborn.html
>>
>> 2016-09-29 20:49 GMT+01:00 Christoph-Simon Senjak
>> <christoph.senjak at googlemail.com>:
>>>
>>> Hi.
>>>
>>> I would like to have the package [1] (which has not been packaged yet,
>>> neither any other mediawiki-libraries for python, apparently) in a
>>> nix-shell.
>>>
>>> I tried to use python2nix, but I get the following error message:
>>>
>>>
>>> $ python2nix wptools
>>> Traceback (most recent call last):
>>>   File
>>> "/nix/store/alb0xq3d2rz5cvhsnycfqy6vvps7rf8i-python2nix-20140927/bin/.python2nix-wrapped",
>>> line 8, in <module>
>>>     from python2nix import main
>>>   File
>>> "/nix/store/alb0xq3d2rz5cvhsnycfqy6vvps7rf8i-python2nix-20140927/lib/python2.7/site-packages/python2nix/__init__.py",
>>> line 5, in <module>
>>>     from python2nix import pip_deps
>>>   File
>>> "/nix/store/alb0xq3d2rz5cvhsnycfqy6vvps7rf8i-python2nix-20140927/lib/python2.7/site-packages/python2nix/pip_deps.py",
>>> line 15, in <module>
>>>     from pip.log import logger
>>> ImportError: No module named log
>>>
>>> This appears to be some dependency problem, right? How can I fix this?
>>>
>>> Best Regards,
>>> Christoph-Simon Senjak
>>>
>>> [1]:https://github.com/siznax/wptools
>>> _______________________________________________
>>> nix-dev mailing list
>>> nix-dev at lists.science.uu.nl
>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>
>>
>>
>>
>> --
>> Tomasz Czyż
>>
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>



-- 
Rok Garbas
https://garbas.si


More information about the nix-dev mailing list