Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Error when running pypi2nix command on obonet #117

Closed
blakesweeney opened this issue Apr 5, 2017 · 4 comments
Closed

Error when running pypi2nix command on obonet #117

blakesweeney opened this issue Apr 5, 2017 · 4 comments
Milestone

Comments

@blakesweeney
Copy link

Description

The setup.py file is trying to read the readme file to create the long description, but the readme isn't in the downloaded files. If I run pypi with -E pandoc this still crashes because pandoc cannot read the file.

Traceback

% cat requirements.txt
obonet
networkx
% pypi2nix --version
1.6.0
% pypi2nix -v -V 3.5 -r requirements.txt
|-> nix-shell /nix/store/953f650qfbikqb4c32fnv1ifqak5rnpy-pypi2nix-1.6.0/pkgs/pypi2nix/pip.nix --argstr wheel_cache_dir /var/folders/0p/ntwwt0wn6mn977__st9132m80000gn/T/pypi2nix/cache/wheel --argstr download_cache_dir /var/folders/0p/ntwwt0wn6mn977__st9132m80000gn/T/pypi2nix/cache/download --argstr project_dir /var/folders/0p/ntwwt0wn6mn977__st9132m80000gn/T/pypi2nix/05cc0db81167a5ec9588a4477ea7ee07 --argstr python_version python35 --arg requirements_files [ "/var/folders/0p/ntwwt0wn6mn977__st9132m80000gn/T/pypi2nix/05cc0db81167a5ec9588a4477ea7ee07/6bbbc2206e4b2c64140046db449d74cb.txt" ] --arg extra_build_inputs [  ] --arg setup_requires [  ] --argstr pip_build_dir /var/folders/0p/ntwwt0wn6mn977__st9132m80000gn/T/pypi2nix/cache/pip -I nixpkgs=/Users/blake/.nix-defexpr/channels/nixpkgs --show-trace --pure --run exit    Collecting obonet (from -r /var/folders/0p/ntwwt0wn6mn977__st9132m80000gn/T/pypi2nix/05cc0db81167a5ec9588a4477ea7ee07/6bbbc2206e4b2c64140046db449d74cb.txt (line 1))
      Using cached obonet-0.2.1.tar.gz
        Complete output from command python setup.py egg_info:
        README.md conversion to reStructuredText failed. Error:
        [Errno 2] No such file or directory: 'pandoc'
        Traceback (most recent call last):
          File "/var/folders/0p/ntwwt0wn6mn977__st9132m80000gn/T/pypi2nix/cache/pip/obonet/setup.py", line 22, in <module>
            long_description = subprocess.check_output(args)
          File "/nix/store/vjqr0kb99jnnd04r505192gq2yrwgwv3-python3-3.5.3/lib/python3.5/subprocess.py", line 316, in check_output
            **kwargs).stdout
          File "/nix/store/vjqr0kb99jnnd04r505192gq2yrwgwv3-python3-3.5.3/lib/python3.5/subprocess.py", line 383, in run
            with Popen(*popenargs, **kwargs) as process:
          File "/nix/store/vjqr0kb99jnnd04r505192gq2yrwgwv3-python3-3.5.3/lib/python3.5/subprocess.py", line 676, in __init__
            restore_signals, start_new_session)
          File "/nix/store/vjqr0kb99jnnd04r505192gq2yrwgwv3-python3-3.5.3/lib/python3.5/subprocess.py", line 1282, in _execute_child
            raise child_exception_type(errno_num, err_msg)
        FileNotFoundError: [Errno 2] No such file or directory: 'pandoc'
        
        During handling of the above exception, another exception occurred:
        
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/var/folders/0p/ntwwt0wn6mn977__st9132m80000gn/T/pypi2nix/cache/pip/obonet/setup.py", line 28, in <module>
            with open(readme_path) as read_file:
        FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/0p/ntwwt0wn6mn977__st9132m80000gn/T/pypi2nix/cache/pip/obonet/README.md'
        
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /var/folders/0p/ntwwt0wn6mn977__st9132m80000gn/T/pypi2nix/cache/pip/obonet/
@seppeljordan
Copy link
Contributor

seppeljordan commented Apr 6, 2017

This sounds like an issue with obonet. To work around this you could try something like this in your requirements.txt

git+https://github.com/dhimmel/obonet.git#egg=obonet

This would download the source from the git and you'll probably have the README.md

Ping me ( @seppeljordan ) or reopen this issue if you still need help or you think that this is NOT an issue with obonet but an issue with pypi2nix.

@blakesweeney
Copy link
Author

That still doesn't work. I am now getting:

% nix-shell --version
nix-shell (Nix) 1.11.6
% nix-shell
these derivations will be built:
  /nix/store/b75pm8c3kw3dv1asp70xws6dbpkg5pxv-obonet.git.drv
  /nix/store/g7y7vkx3q3zhypkig8irv63ra6xqdn7c-python3.5-obonet-0.2.1.drv
  /nix/store/qqz461bb4yi6y219dmb8qhfgaib4i2ds-python3.5-python35-interpreter.drv
building path(s) ‘/nix/store/jbb6pmkdpgn5z3gyhal0nrxib315c42n-obonet.git’

trying https://github.com/dhimmel/obonet.git
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   178  100   178    0     0    548      0 --:--:-- --:--:-- --:--:--   554
100 58252    0 58252    0     0  78532      0 --:--:-- --:--:-- --:--:-- 4321k
output path ‘/nix/store/jbb6pmkdpgn5z3gyhal0nrxib315c42n-obonet.git’ has sha256 hash ‘0cg52vb93imvcc1pcr0y9fjyxfch8l40fsgjnsknw06zdm210kk6’ when ‘0qpnwgwndsiclvgw7bc9w0ysy24lrdp1ff6d30bh3p83mk43jr0i’ was expected
cannot build derivation ‘/nix/store/g7y7vkx3q3zhypkig8irv63ra6xqdn7c-python3.5-obonet-0.2.1.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/g7y7vkx3q3zhypkig8irv63ra6xqdn7c-python3.5-obonet-0.2.1.drv’ failed

I think this is because nix changed something about how it computes hashes with git clones a while ago. At least I recall that happening and it would explain what is going on here. Do I need to update nix, or is this a problem with pypi2nix?

@garbas
Copy link
Contributor

garbas commented Apr 10, 2017

this worked for me

% pypi2nix -v -V 3.5 -e "https://github.com/dhimmel/obonet/archive/master.zip#egg=obonet" -e networkx -E pandoc
% nix-build requirements.nix -A interpreter

@blakesweeney
Copy link
Author

blakesweeney commented Apr 10, 2017 via email

@garbas garbas modified the milestone: 1.8.0 Apr 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants