← Back to issue list

Snapcraft only includes lib/python*/site-packages in site

View original Launchpad issue

Metadata

Project
snapcraft
Number
#1715406
Type
issue
State
open
Author
~ev
Labels
Created
2017-09-06 14:21:39.949281+00:00
Updated
2019-01-24 00:46:53.444060+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

Debugging why `import google.protobuf` wasn't working inside a snap, I found that snapcraft only puts $SNAP/lib/python*/site-packages into site.addsitedir(). As I was using pip inside a scriptlet without additional environment variables or command line parameters, it was installing the modules to $SNAP/usr/lib/python*/site-packages. This meant that python was looking in the wrong place for protobuf-3.4.0-py2.7-nspkg.pth. Can we include $SNAP/usr/lib in a list fed to site.addsitedir()?

Evaluation history

No evaluation history available.