Hi:

I am attempting to create a launchpad API part and have run into an issue with the snap correctly resolving lazr.restfulclient.

The error I get is:
   Traceback (most recent call last):
     File "/snap/lptools-john/x2/usr/bin/testreport.py", line 9, in <module>
       from launchpadlib.launchpad import Launchpad
     File "/snap/lptools-john/x2/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 33, in <module>
       from lazr.restfulclient.resource import (
   ImportError: No module named lazr.restfulclient.resource

I have confirmed that resource.py exists and is readable:
  /snap/lptools-john/x2/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py

I have manually modified files and structures and import resolution problems appear to be limited to lazr.restfulclient.

Here is my snapcraft.yaml:

name: lptools-john
version: 0.1.3
summary: 'Tools for managing and reporting upon lp projects'
description: 'Tools for managing and reporting upon lp projects - short description'
confinement: devmode

apps:
   syspath:
       command: usr/bin/syspath.py
   testreport:
       command: usr/bin/testreport.py

parts:
   launchpadapi:
       plugin: python2
       stage-packages:
         - python-launchpadlib
         - python-httplib2
         - python-lazr.restfulclient
       filesets:
         apifs:
             - usr/lib/python2.7/dist-packages/launchpadlib
             - usr/lib/python2.7/dist-packages/httplib2
             - usr/lib/python2.7/dist-packages/lazr
             - etc/
             - lib/
             - usr/
       stage:
         - $apifs
       snap:
         - $apifs
   tests:
       plugin: copy
       files:
         syspath.py: usr/bin/syspath.py
         testreport.py: usr/bin/testreport.py
I have verified that syspath is set to:
['/snap/lptools-john/x2/usr/bin', '/snap/lptools-john/x2/usr/lib/python2.7/dist-packages', '/snap/lptools-john/x2/usr/lib/python2.7', '/snap/lptools-john/x2/usr/lib/python2.7/plat-x86_64-linux-gnu', '/snap/lptools-john/x2/usr/lib/python2.7/lib-tk', '/snap/lptools-john/x2/usr/lib/python2.7/lib-old', '/snap/lptools-john/x2/usr/lib/python2.7/lib-dynload']

-- 
John Agosta

-- 
Snapcraft mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft

Reply via email to