snapcraft 3.9.7+ ignores the petname Python package when referred to as a requirement in my Python part

Bug #1860768 reported by Pen Gale
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Confirmed
Undecided
Unassigned

Bug Description

One of the Python tools that we build as part of the MicroStack path specifies petname in its requirements.txt.

When building with snapcraft 3.9.7+, petname is not added to the built snap. The part in question (launch) has not changed, and other Python packages specified in other parts' requirements do get added.

This is kind of an odd one, because I'm able to build a much simpler snap that contains petname, and I know that the snapcraft snap uses petname. Per today's conversations, I am working on getting more logging and info on this, and will post it at my earliest opportunity.

Changed in snapcraft:
status: New → Confirmed
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

This seems to be related to LP: #1860884 but nothing has changed in snapcraft for this to be triggered only now since our sitecustomize logic has remained static pretty much since 2017

Revision history for this message
Pen Gale (pengale) wrote :

Following up on this: I uploaded a build to latest/edge/missing-petname.

If you unsquashfs it, you'll note that petname is note in site packages, despite being called out in the requirements.txt for the tools/launch part (https://opendev.org/x/microstack/src/branch/master/tools/launch/requirements.txt)

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

ok, seems that in the end https://github.com/snapcore/snapcraft/pull/2901 fixes this:

sergiusens@central-city:~/projects/snaps/microstack$ snapcraft --use-lxd --shell-after
...
Snapped microstack_stein_amd64.snap
snapcraft-microstack # find prime -name '*petname*'
prime/lib/python3.6/site-packages/petname
prime/lib/python3.6/site-packages/petname-2.6.dist-info
prime/bin/petname
snapcraft-microstack #

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Marking as dupe of the other bug. Suspicion is that reordering of how parts were built made python from the stage directory to be picked up which already had the sitecustomize which made it omit the petname from the part.

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.