python package failed to install because of directories in the source

Bug #1673658 reported by Thomi Richards
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Confirmed
Low
Unassigned

Bug Description

Edit: title updated. See comment #3.

Upon upgrading to 2.27.1, I find that snapcraft no longer builds my trivial test snap (hosted here: https://code.launchpad.net/~thomir/+git/thomir-says).

It looks like the executable script is no longer being staged, but it does appear in the 'build' directory.

While I don't mind that my test snap no longer builds, I worry that this may represent a major regression for all (or at least some) python-based snaps.

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

Thanks for teh report Thomi.

Can you please clarify which executable are you missing?

$ ls prime/bin/
thomir-says.py

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Hi Leo,

my prime/bin/ is empty!

clearly there's something other than the snapcraft release at play here... any ideas?

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Further information:

The build starts working once I removed a few old files and directories that weren't being removed by 'snapcraft clean'. The files & directories I removed were:

        build/
        dist/
        thomir-says_0.0.1a_amd64.snap
        thomir_says.egg-info/
        ve3/

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

We discovered that this is not a regression. And I'm inclined to say that snapcraft shouldn't remove any directories from the source, even if they cause python to go crazy.

However, this could be a little uncomfortable. If you install your python module in the source dir, and it's the same source dir for the snap, you are likely to find this problem or some other worse. Maybe the python plugin could warn if it finds directories that will cause errors during install, or maybe we can force it to ignore these directories and install to $SNAPCRAFT_PART_INSTALL any way. Other ideas are welcome.

summary: - regression: 2.27.1 fails to build snap that earlier versions built
- without issue
+ python package failed to install because of directories in the source
description: updated
Changed in snapcraft:
status: New → Confirmed
importance: Undecided → Low
tags: added: plugin
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.