Thanks! This worked. 

stage_packages should have worked too.  I wonder if this debian archive bug is related to why it didn't work:
https://bugs.launchpad.net/lazr.restfulclient/+bug/1500460

I added my info to this bug.


On 06/27/2016 11:59 AM, Kyle Fazzari wrote:
On 06/27/2016 01:55 PM, Sergio Schvezov wrote:

El 27/06/16 a las 14:29, John Agosta escribió:
Hi:
Hi there!

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 am not entirely sure what is up with this module coming from the
debian package in the archives but Kyle (CCed) has had success with this
by grabbing the package from pypi directly using the `python-packages`
keyword.
Indeed. I've not investigated this enough to know for sure, but it seems
that the lazr deb doesn't contain the correct __init__.py files. I
suspect they're setup after the fact, e.g. in a postinst. Anyway, as
Sergio said, I was able to work around it by using `python-packages`
instead. My use-case was launchpadlib as well, so you might find this
useful:

    https://github.com/kyrofa/cla-check/blob/master/snapcraft.yaml

--
Kyle Fazzari (kyrofa)
Software Engineer
Canonical Ltd.
[email protected]





-- 
John Agosta

Program Manager, snappy Ubuntu Core and Internet of Things
UES Commercial Device Operations 
Canonical USA, LTD
[email protected]
+1 (970) 217-5115

Ubuntu: creating the world’s best open source software platform
-- 
Snapcraft mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft

Reply via email to