← All tasks
pythonLegrandin/pycryptodome #22Not a task: already works

error: [Errno 2] No such file or directory: 'build/test1.c'

envgap__Legrandin__pycryptodome-22

01 / FAILURE SIGNATURE

As reported upstream

error: [Errno 2] No such file or directory: 'build/test1.c'
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
2f6126c8c3c045a6fd8afcb47bf302ffb5387155
Manifest
setup.py
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

Legrandin/pycryptodome #22 · read the original issue
Hi!,

I'm trying to create a snap package for my project (https://github.com/tizonia/tizonia-openmax-il), and I'm finding this error when pycryptodomex' setup.py is being run.

Pycryptodomex is being pulled as my project depends on 'gmusicapi', and 'gmusicapi' depends on 'pycrodomex'.

It looks like Pycryptodome's setup.py by default assumes a 'build' folder under the distribution root directory, and it looks like there isn't one when all this is being triggered by 'snapcraft'. 

I'm not too familiar with either setup.py scripts or snapcraft, so I guess there is a possibility that this could be a snapcraft defect.

(NOTE: tizonia's snapcraft.yaml location is https://github.com/tizonia/tizonia-openmax-il/blob/master/tools/snapcraft.yaml)

```
 Running setup.py install for rsa ... done
  Running setup.py install for oauth2client ... done
  Running setup.py install for funcsigs ... done
  Running setup.py install for pbr ... done
  Running setup.py install for mock ... done
  Running setup.py install for appdirs ... done
  Running setup.py install for pycryptodomex ... error
    Complete output from command /home/joni/work/snap/parts/pypideps/install/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-EmijGR/pycryptodomex/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" build_ext -I/home/joni/work/snap/parts/pypideps/install/usr/include/python2.7 install --record /tmp/pip-hvWWzT-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmpbv29_M:
    running build_ext
    error: [Errno 2] No such file or directory: 'build/test1.c'

    ----------------------------------------
Command "/home/joni/work/snap/parts/pypideps/install/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-EmijGR/pycryptodomex/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" build_ext -I/home/joni/work/snap/parts/pypideps/install/usr/include/python2.7 install --record /tmp/pip-hvWWzT-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmpbv29_M" failed with error code 1 in /tmp/pip-build-EmijGR/pycryptodomex/
Traceback (most recent call last):
  File "/usr/bin/snapcraft", line 31, in <module>
    snapcraft.main.main()
  File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 203, in main
    return run(args, project_options)
  File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 259, in run
    lifecycle.snap(project_options, args['<directory>'], args['--output'])
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 256, in snap
    snap = execute('prime', project_options)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 98, in execute
    _Executor(config, project_options).run(step, part_names)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 127, in run
    self._run_step(step, part, part_names, dirty, recursed)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 165, in _run_step
    getattr(part, step)()
  File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler.py", line 276, in pull
    self.code.pull()
  File "/usr/lib/python3/dist-packages/snapcraft/plugins/python2.py", line 106, in pull
    self._pip()
  File "/usr/lib/python3/dist-packages/snapcraft/plugins/python2.py", line 147, in _pip
    self.options.python_packages)
  File "/usr/lib/python3/dist-packages/snapcraft/_baseplugin.py", line 221, in run
    return common.run(cmd, cwd=cwd, **kwargs)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/common.py", line 61, in run
    subprocess.check_call(['/bin/sh', f.name] + cmd, **kwargs)
  File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/bin/sh', '/tmp/tmpfqfr7sp2', 'python2', '/home/joni/work/snap/parts/pypideps/install/usr/bin/pip2', 'install', '--global-option=build_ext', '--global-option=-I/home/joni/work/snap/parts/pypideps/install/usr/include/python2.7', '--target', '/home/joni/work/snap/parts/pypideps/install/usr/lib/python2.7/site-packages', '--upgrade', 'soundcloud', 'gmusicapi']' returned non-zero exit status 1
```
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]