<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    El 03/10/16 a las 23:59, Marco Ceppi escribió:<br>
    <blockquote
cite="mid:CAGuW62B9XuQ6Cwrhi_iU4HC_MBpe=CbjsESseqb-PuXy9dKFRA@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <br>
        <div class="gmail_quote">
          <div dir="ltr">On Mon, Oct 3, 2016 at 9:41 PM Sergio Schvezov
            <<a moz-do-not-send="true"
              href="mailto:sergio.schvezov@canonical.com">sergio.schvezov@canonical.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000" class="gmail_msg"> El
              03/10/16 a las 21:17, Marco Ceppi escribió:</div>
            <div bgcolor="#FFFFFF" text="#000000" class="gmail_msg"><br
                class="gmail_msg">
              <blockquote type="cite" class="gmail_msg">
                <div dir="ltr" class="gmail_msg">
                  <div class="gmail_quote gmail_msg">
                    <div dir="ltr" class="gmail_msg">On Mon, Oct 3, 2016
                      at 6:51 PM Sergio Schvezov <<a
                        moz-do-not-send="true"
                        href="mailto:sergio.schvezov@canonical.com"
                        class="gmail_msg" target="_blank">sergio.schvezov@canonical.com</a>>
                      wrote:<br class="gmail_msg">
                    </div>
                    <blockquote class="gmail_quote gmail_msg"
                      style="margin:0 0 0 .8ex;border-left:1px #ccc
                      solid;padding-left:1ex"><br class="gmail_msg">
                      <br class="gmail_msg">
                      El 03/10/16 a las 16:47, Marco Ceppi escribió:<br
                        class="gmail_msg">
                      > Hi Sergio,<br class="gmail_msg">
                      ><br class="gmail_msg">
                      > Sorry, replication instructions are as
                      follows:<br class="gmail_msg">
                      ><br class="gmail_msg">
                      > export JUJU_REPOSITORY=$(mktemp -dp $HOME)<br
                        class="gmail_msg">
                      > cd $JUJU_REPOSITORY<br class="gmail_msg">
                      > charm pull-source ~marcoceppi/charm-svg .<br
                        class="gmail_msg">
                      ><br class="gmail_msg">
                      > This will trigger the error. Anytime the code
                      path needs to interact<br class="gmail_msg">
                      > with launchpadlib it fails. If you pull the
                      stable channel from the<br class="gmail_msg">
                      > store you'll see it succeeds.<br
                        class="gmail_msg">
                      <br class="gmail_msg">
                      Did this ever work?<br class="gmail_msg">
                      dpkg -S
                      /usr/lib/python2.7/dist-packages/lazr/__init__.py<br
                        class="gmail_msg">
                    </blockquote>
                    <div class="gmail_msg"><br class="gmail_msg">
                    </div>
                    <div class="gmail_msg">It did (and does work) before
                      I updated snapcraft.</div>
                    <div class="gmail_msg"> </div>
                    <blockquote class="gmail_quote gmail_msg"
                      style="margin:0 0 0 .8ex;border-left:1px #ccc
                      solid;padding-left:1ex">Tells me it is not owned
                      by any package so very unlikely that a<br
                        class="gmail_msg">
                      `stage-packages entry would of brought it in. I am
                      interested!<br class="gmail_msg">
                      <br class="gmail_msg">
                      For what it's worth, Kyle had the same issue and
                      we just went to pypi<br class="gmail_msg">
                      for this, if you prefer going down this path just
                      add this to the python<br class="gmail_msg">
                      part in there:<br class="gmail_msg">
                      <br class="gmail_msg">
                      python-packages: [launchpadlib, simplejson]<br
                        class="gmail_msg">
                    </blockquote>
                    <div class="gmail_msg"><br class="gmail_msg">
                    </div>
                    <div class="gmail_msg">Launchpadlib is already a
                      dependency in the software project, I shouldn't
                      need to declare it again in the snapcraft?</div>
                  </div>
                </div>
              </blockquote>
              <br class="gmail_msg">
            </div>
            <div bgcolor="#FFFFFF" text="#000000" class="gmail_msg"> No
              you don't ;-) You want to set `requirements:
              requirements.txt`<br class="gmail_msg">
              If you want it automatically installed use
              install_requires (<a moz-do-not-send="true"
                class="m_1983676755409533719moz-txt-link-freetext
                gmail_msg"
                href="https://packaging.python.org/requirements/"
                target="_blank">https://packaging.python.org/requirements/</a>)</div>
            <div bgcolor="#FFFFFF" text="#000000" class="gmail_msg"><br
                class="gmail_msg">
            </div>
          </blockquote>
          <div>In my projects setup.py I declare the install_requires,
            why aren't these being included during snap generation?</div>
          <div><br>
          </div>
          <div><a moz-do-not-send="true"
              href="https://github.com/juju/charm-tools/blob/master/setup.py">https://github.com/juju/charm-tools/blob/master/setup.py</a></div>
        </div>
      </div>
    </blockquote>
    <br>
    Ok this at least provides an explanation for me, long story short,
    you can remove python-launchpadlib from `stage-packages`, but
    lazr.restfulclient is missing a dependency on simplejson in
    install_requires so you can add that to yours temporarily until the
    dep is added there.<br>
    <br>
<a class="moz-txt-link-freetext" href="http://bazaar.launchpad.net/~lazr-developers/lazr.restfulclient/trunk/view/head:/setup.py#L55">http://bazaar.launchpad.net/~lazr-developers/lazr.restfulclient/trunk/view/head:/setup.py#L55</a><br>
    <br>
    By using launchpadlib as a stage package here is why you got it:<br>
    <br>
    <blockquote>Depends: python-httplib2 (>= 0.4.0), python-keyring
      (>= 0.5), python-lazr.restfulclient (>= 0.11.2),    <br>
      python-lazr.uri (>= 1.0.2-4~), python-oauth, python-simplejson,
      python-wadllib, python:any (<< 2.8), <br>
      python:any (>= 2.7.5-5~)<br>
    </blockquote>
    <br>
    You can still use the launchpadlib as a stage-packages entry if you
    want but you will need to `touch __init__.py` where it is missing (I
    will discuss further with Barry to see if there is a clean way we
    can do this automatically with no side effects).<br>
    <br>
    And last but not least, here is the reason it worked; the previous
    version of the python plugins put dist-packages and site-packages
    all in the same bag, installed the stage-package and then ignored
    what was already there and installed what was in your
    install_requires; so on the first run you'd get an incomplete lazr
    package but you would get simplejson and on the second run you'd
    install over. The new plugin is much more respectful about this.<br>
    <br>
    <br>
  </body>
</html>