Contributing to snapcraft: tools/environment-setup.sh script fails

I’m preparing a PR for snapcraft but running the tools/environment-setup.sh script to create the dev container fails with the following error message:

 ERROR: Command errored out with exit status 1:
     command: /home/ubuntu/.venv/snapcraft/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-f_q9_t67/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-f_q9_t67/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-tesfpinx/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/.venv/snapcraft/include/site/python3.6/python-apt
         cwd: /tmp/pip-req-build-f_q9_t67/
    Complete output (8 lines):
    W: [python3.6] DistUtilsExtra import error.
    W: [python3.6] Sphinx import error.
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help
    
    error: option --single-version-externally-managed not recognized
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/ubuntu/.venv/snapcraft/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-f_q9_t67/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-f_q9_t67/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-tesfpinx/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/.venv/snapcraft/include/site/python3.6/python-apt Check the logs for full command output.

Ping? I’d like to get going again :slight_smile:

1 Like

Oh shucks, I thought I already pushed a fix for that. Sorry!

Here it is if you want to apply it locally for now:

1 Like