Hi Folks,
The project I’m trying to snap up required python3-setuptools as a staging package.
Problem is, I run into this error when snapping
ERROR: Command errored out with exit status 1:
command: /root/stage/usr/bin/python3 /snap/snapcraft/3943/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpjvcdn261
cwd: /tmp/pip-download-vdr4ovym/pygobject
Complete output (10 lines):
Traceback (most recent call last):
File "/snap/snapcraft/3943/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
main()
File "/snap/snapcraft/3943/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/snap/snapcraft/3943/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 85, in get_requires_for_build_wheel
backend = _build_backend()
File "/snap/snapcraft/3943/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 76, in _build_backend
obj = getattr(obj, path_part)
AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'
----------------------------------------
ERROR: Command errored out with exit status 1: /root/stage/usr/bin/python3 /snap/snapcraft/3943/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpjvcdn261 Check the logs for full command output.
Failed to run '/root/stage/usr/bin/python3 -m pip download --disable-pip-version-check --dest /root/parts/requirements/python-packages --requirement /root/parts/requirements/src/requirements.txt': Exited with code 1.
From my research, it seems this is a known problem when setuptools version is less than v 40.8.
18.04 repositories use 39.0.1-2 unfortunately.
How can I get the latest setuptools version in this snap, or what workaround might there be?
Thanks!