binary entry (and lib) for python projects not installed in final snap

Bug #1670323 reported by Didier Roche on 2017-03-06
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
Undecided
Unassigned
snapcraft (Ubuntu)
Medium
Unassigned

Bug Description

Example project:

1. git clone lp:~apw/+git/so-trello
1a. git checkout snapcraft-bug
-> as you can see, this project define in setup.py a "scripts:" entry (not that the same behavior seen with entry_points)
2. Remove the "trellotool" part dump hack (to workaround that bug).
3. Run snapcraft
-> Failure in non binary found.
From what I saw, pip installs components from requirements.txt, but not trellotool or the script entry in the final snap. They are in parts/python-bits/build directory, but not in parts/python-bits/install ones, and so not in stage/ or prime.

After a quick bisect, I found that the guilty commit was: https://github.com/snapcore/snapcraft/commit/652ac1238a8b1bb1af8ddc20c0c71d2e8e66680c. Confirming that taking the previous version of python.py on tip works.

My bet is that the install from wheel switch is guilty.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: snapcraft 2.27.1 [modified: usr/lib/python3/dist-packages/snapcraft/_baseplugin.py usr/lib/python3/dist-packages/snapcraft/plugins/python.py]
ProcVersionSignature: Ubuntu 4.4.0-64.85-generic 4.4.44
Uname: Linux 4.4.0-64-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Mar 6 12:19:38 2017
InstallationDate: Installed on 2012-05-28 (1742 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
PackageArchitecture: all
SourcePackage: snapcraft
UpgradeStatus: Upgraded to xenial on 2014-10-31 (857 days ago)

Didier Roche (didrocks) wrote :
summary: - binary entry (and lib) for python projects not installed in finale snap
+ binary entry (and lib) for python projects not installed in final snap
Andy Whitcroft (apw) wrote :

Ok this seems to be being triggered by the name= parameter in the setup.py matching the name of a module in the requirements.txt. This likely should trigger a warning at least.

Andy Whitcroft (apw) on 2017-03-11
description: updated
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapcraft (Ubuntu):
status: New → Confirmed
Changed in snapcraft:
status: New → Confirmed
Changed in snapcraft (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers