<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 15/06/2016 20:09, John Agosta a
écrit :<br>
</div>
<blockquote cite="mid:576199F3.90009@canonical.com" type="cite">Hi:
<br>
</blockquote>
<br>
Hey John!<br>
<br>
Happy to help you there ;)<br>
<blockquote cite="mid:576199F3.90009@canonical.com" type="cite">
<br>
I suspect this should be strait forward, but have been fumbling
with this ... I have a set of python2 scripts sitting in a
launchpad.net bzr branch that I am trying to snap up using
snapcraft. These are essentially just a set of files (scripts)
that have never been placed into any formal packaging structure.
<br>
<br>
I can correctly build the python part using the structure:
<br>
<br>
parts:
<br>
lptools:
<br>
plugin: python2
<br>
source: lp:~jagosta/my-program/lp_tools
<br>
<br>
Where I am stuck is with defining the apps:, thus creating the
commands that I would like to be placed into the bin/ directory of
the snap.
<br>
</blockquote>
<br>
Do you really need to have those scripts placed into the bin/
directory? apps: can define a command: directory, and you expose
every entry point you want your user to get access to (see
<a class="moz-txt-link-freetext" href="https://developer.ubuntu.com/en/snappy/build-apps/snapcraft-syntax/">https://developer.ubuntu.com/en/snappy/build-apps/snapcraft-syntax/</a>).<br>
Some examples of applications exposing multiple entry point is one
of the application from the snapcraft.io tour (I encourage you to
have a look here!): <a class="moz-txt-link-freetext" href="http://snapcraft.io/create/">http://snapcraft.io/create/</a>, in particular this
section should give you your needed answers: "02-parts: Snapcraft
makes snaps out of parts".<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<pre class="command-line" style="box-sizing: border-box; -webkit-font-smoothing: antialiased; border: 0px; margin: 0px 0px 0.75em; padding: 0.7em 1em; vertical-align: baseline; border-radius: 4px; background-color: rgb(247, 247, 247); white-space: pre-wrap; word-wrap: break-word; font-size: 16px; line-height: 1.5; font-family: "Ubuntu Mono"; position: relative; overflow: hidden; font-weight: 300; color: rgb(51, 51, 51); width: 679.438px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><code style="box-sizing: border-box; -webkit-font-smoothing: antialiased; border: 0px; margin: 0px 0px 0.75em; padding: 0px; vertical-align: baseline; font-size: 16px; line-height: 1.5; font-family: "Ubuntu Mono", Consolas, Monaco, "Lucida Console", "Courier New", Courier, mo
nospace;">apps:
hello:
command: hello
bash:
command: bash
</code></pre>
<br class="Apple-interchange-newline">
See that the 2 commands aren't in any particular directory, command
just refers to a path to your executable, relative to the root of
your snap.<br>
<br>
Hope this helps!<br>
<br>
Didier<br>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<br>
</body>
</html>