← Back to issue list

Warn when python plugin is used for non-setuptools project

View original Launchpad issue

Metadata

Project
snapcraft
Number
#1804682
Type
issue
State
open
Author
~merlijn-sebrechts
Labels
Created
2018-11-22 16:55:51.095715+00:00
Updated
2018-11-22 16:55:51.095715+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

The Python plugin doesn't seem to work for non-setuptools projects, but it isn't clear why it is failing if that's the case. I encountered this issue and it seems I'm not the only one: https://forum.snapcraft.io/t/building-a-python-snap-package/6766 snapcraft should detect cases where this plugin is used on non-setuptools projects and give a clear warning or error message that explains it's being misused. This is the warning I receive when I try to create a snap package of a single python script file using the `python` plugin: Priming testapp 'grade' property not specified: defaulting to 'stable' Sorry, an error occurred in Snapcraft: Traceback (most recent call last): File "/snap/snapcraft/1871/bin/snapcraft", line 11, in <module> load_entry_point('snapcraft==2.43.1', 'console_scripts', 'snapcraft')() File "/snap/snapcraft/1871/lib/python3.5/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/snap/snapcraft/1871/lib/python3.5/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/snap/snapcraft/1871/lib/python3.5/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/snap/snapcraft/1871/lib/python3.5/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/snap/snapcraft/1871/lib/python3.5/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py", line 136, in snap project = _execute(steps.PRIME, parts=[], **kwargs) File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py", line 35, in _execute lifecycle.execute(step, project_config, parts) File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 90, in execute executor.run(step, part_names) File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 196, in run self._create_meta(step, processed_part_names) File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 359, in _create_meta self.config.validator.schema, File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/internal/meta/_snap_packaging.py", line 109, in create_snap_packaging packaging.write_snap_yaml() File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/internal/meta/_snap_packaging.py", line 312, in write_snap_yaml snap_yaml = self._compose_snap_yaml() File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/internal/meta/_snap_packaging.py", line 468, in _compose_snap_yaml snap_yaml["apps"] = self._wrap_apps(self._config_data["apps"]) File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/internal/meta/_snap_packaging.py", line 567, in _wrap_apps self._wrap_app(app, apps[app]) File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/internal/meta/_snap_packaging.py", line 575, in _wrap_app app[k] = self._wrap_exe(app[k], "{}-{}".format(k, name)) File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/internal/meta/_snap_packaging.py", line 546, in _wrap_exe with open(exepath, "rb") as exefile: FileNotFoundError: [Errno 2] No such file or directory: '/root/build_testapp/prime/./testapp' We would appreciate it if you created a bug report at

Evaluation history

No evaluation history available.