python plugin ignores source-subdir

Bug #1741131 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

When the setup.py file is in a subdir of the project, the python plugin can't find it and thus finishes without installing anything.

To reproduce, let's modify the python-hello test snap:

$ mkdir tmp
$ cd tmp
$ git clone https://github.com/snapcore/snapcraft
$ cp -R snapcraft/snapcraft/tests/integration/snaps/python-hello/ .
$ cd python-hello
$ mkdir subdir
$ mv hello subdir/
$ mv setup.py subdir/
$ echo " source-subdir: subdir" >> snap/snapcraft.yaml
$ snapcraft

Revision history for this message
Leo Arias (elopio) wrote :

The python plugin refers always to self.sourcedir. It should instead refer to self.builddir, which the base plugin updates to point to source-subdir if present.

Revision history for this message
Leo Arias (elopio) wrote :
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.