<div dir="ltr">This solution works, thanks!!</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 20, 2016 at 4:18 PM, Chris Wayne <span dir="ltr"><<a href="mailto:chris.wayne@canonical.com" target="_blank">chris.wayne@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Sergio,<div><br></div><div>You could try having a wrapper set something like this: </div><div><br></div><div>export GI_TYPELIB_PATH=$SNAP/usr/lib/<wbr>girepository-1.0:$SNAP/usr/<wbr>lib/$ARCH/girepository-1.0 where $ARCH is defined like this:</div><div><br></div><div><div>case "$SNAP_ARCH" in</div><div>    "amd64") ARCH='x86_64-linux-gnu'</div><div>    ;;</div><div>    "i386") ARCH='i386-linux-gnu'</div><div>    ;;</div><div>    "arm64") ARCH='aarch64-linux-gnu'</div><div>    ;;</div><div>    "armhf") ARCH='arm-linux-gnueabihf'</div><div>    ;;</div><div>    *)</div><div>        echo "Unsupported architecture: $SNAP_ARCH"</div><div>    ;;</div><div>esac</div></div><div><br></div><div>Hope that helps!</div><div><br></div><div>Thanks</div><div>Chris</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Dec 20, 2016 at 2:00 PM, Sergio Cazzolato <span dir="ltr"><<a href="mailto:sergio.cazzolato@canonical.com" target="_blank">sergio.cazzolato@canonical.<wbr>com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hello, I am creating a snap which has a the python3-gi dependency (as it is shown below)</div><div><span style="color:rgb(0,0,0);font-family:"dejavu sans mono";font-size:9pt"><br></span></div><div><span style="color:rgb(0,0,0);font-family:"dejavu sans mono";font-size:9pt">parts:</span><br></div><div><pre style="color:rgb(0,0,0);font-family:"dejavu sans mono";font-size:9pt">  kpi-dbus-tests:<br>    plugin: nil<br>    stage-packages:<br>      - gir1.2-glib-2.0<br>      - python3-dbus<br>      - python3-gi<br></pre></div><div><br></div><div>When I run the python script which is using the gi dependency I am getting some errors when it try to import the dependencies. I took a look and the dependencies are installed correctly. </div><div><br></div><div>Traceback (most recent call last):</div><div>  File "/snap/kpi-dbus-tests/x1/dbus_<wbr>signal_spammer.py", line 25, in <module></div><div>    from gi.repository import GObject</div><div>  File "/snap/kpi-dbus-tests/x1/usr/l<wbr>ib/python3/dist-packages/gi/im<wbr>porter.py", line 127, in find_module</div><div>    'introspection typelib not found' % namespace)</div><div>ImportError: cannot import name GObject, introspection typelib not found</div><div><div><br></div><div>Traceback (most recent call last):<br></div><div>  File "<frozen importlib._bootstrap>", line 890, in _find_spec</div><div>AttributeError: 'DynamicImporter' object has no attribute 'find_spec'</div></div><div><br></div><div>Also in classic mode, I manually installed the dependencies and executed the python script and it works properly. </div><div><br></div><div>Any idea about which could be the problem?</div><div><br></div><div>Thanks</div></div>
<br></div></div><span class="HOEnZb"><font color="#888888">--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/snapcraft</a><br>
<br></font></span></blockquote></div><br></div>
<br>--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/snapcraft</a><br>
<br></blockquote></div><br></div>