Pull phase for python app fails if there is a space character in the current path

Bug #1716375 reported by Tony Arnold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapcraft (Ubuntu)
New
Undecided
Unassigned

Bug Description

Attempts to build a snap using the python plugin fails if the current working directory path has spaces in it. It fails when invoking pip to download the packages required by the python app.

In my case I got the following:

Installing collected packages: pip, setuptools, wheel
Successfully installed pip-9.0.1 setuptools-36.4.0 wheel-0.30.0
/home/tony/Documents/Programming Projects/Python Projects/TemperaturePi/parts/plot-temp/install/usr/bin/python3 -m pip download --disable-pip-version-check --dest /home/tony/Documents/Programming Projects/Python Projects/TemperaturePi/parts/plot-temp/packages .
/tmp/tmp5wf8s_yi: 5: export: Projects/Python: bad variable name
Command '['/bin/sh', '/tmp/tmp5wf8s_yi', '/home/tony/Documents/Programming Projects/Python Projects/TemperaturePi/parts/plot-temp/install/usr/bin/python3', '-m', 'pip', 'download', '--disable-pip-version-check', '--dest', '/home/tony/Documents/Programming Projects/Python Projects/TemperaturePi/parts/plot-temp/packages', '.']' returned non-zero exit status 2

The path supplied to the --dest option has spaces in it and should ideally be surrounded by quotation marks to avoid this error.

Note if I move the folder where I am trying to build the snap to a path with no spaces in it, the snap builds successfully.

Version information:

$ lsb_release -rd
Description: Ubuntu 17.04
Release: 17.04

$ apt policy snapcraft
snapcraft:
  Installed: 2.33+17.04
  Candidate: 2.33+17.04
  Version table:
 *** 2.33+17.04 500
        500 http://gb.archive.ubuntu.com/ubuntu zesty-updates/universe amd64 Packages
        500 http://gb.archive.ubuntu.com/ubuntu zesty-updates/universe i386 Packages
        100 /var/lib/dpkg/status
     2.28+17.04 500
        500 http://gb.archive.ubuntu.com/ubuntu zesty/universe amd64 Packages
        500 http://gb.archive.ubuntu.com/ubuntu zesty/universe i386 Packages

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.