Skip to content
Snippets Groups Projects
Commit 38c26e60 authored by jkerdreu's avatar jkerdreu
Browse files

Add xaal-pkgrun

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2875 b32b6428-25c9-4566-ad07-03861ab6144f
parent a97ae69e
Branches
No related tags found
No related merge requests found
......@@ -641,7 +641,7 @@ $ python setup.py develop</code></pre>
<pre class="code bash literal-block"><code>$ <span class="name builtin">cd</span> xaal_svn/apps/tools
$ python setup.py develop</code></pre>
<p>You can use the <em>python setup.py install</em> instead of <em>develop</em>, but modification
in source files, won't be applied, you have to re-install it. Right now develop,
in source files won't be applied, you have to re-install it. Right now, <em>develop</em>
is the best option.</p>
<p>Create the configuration file in your home directory:</p>
<pre class="code bash literal-block"><code>$ mkdir ~/.xaal/
......@@ -652,13 +652,13 @@ file according to your needs.</p>
</div>
<div class="section" id="automatic-install">
<h1>Automatic Install</h1>
<p>Instead of manual installation of each packagage, you can use <em>install.py</em> script.
<p>Instead of manual installation of each package, you can use the <em>install.py</em> script.
This script will install allmost all packages without user interaction.</p>
</div>
<div class="section" id="docker">
<h1>Docker</h1>
<p>The docker folder contains an Dockerfile to run the xALL software in a docker
container.</p>
container. The Dockerfile use the automatic installation script.</p>
</div>
<div class="section" id="tests">
<h1>Tests</h1>
......@@ -683,7 +683,7 @@ $ or xaal-tail</code></pre>
<span class="comment single"># display description / attribute for all devices
</span>$ xaal-walker
<span class="comment single"># same but on for lamp devices
<span class="comment single"># same but only for lamp devices
</span>$ xaal-walker -t lamp.any</code></pre>
<p>To turn on/off the lamp</p>
<pre class="code bash literal-block"><code><span class="comment single"># turn on the lamp
......@@ -694,8 +694,8 @@ $ xaal-send -d xxxxxxxxxxxxxx -r turn_on</code></pre>
<h1>Windows</h1>
<p>This code can be used w/ Windows (tested w/ Win10 and Python 3.8). You can build
the virtualenv with the same way. To activate the venv, you should run Scriptsactivate.bat.
For Powershell users (recommanded), you must tweak the ExecutionPolicy
to be able to run Activate.ps1.</p>
For Powershell users (recommanded), you must tweak the ExecutionPolicy to be able to run
<em>Activate.ps1</em>.</p>
<blockquote>
<pre class="code literal-block"><code>Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser</code></pre>
</blockquote>
......@@ -711,8 +711,8 @@ are just renamed with an exe extension (ie: xaal-dumper.exe)</p>
</div>
<div class="section" id="coding-style">
<h1>Coding style</h1>
<p>Every xAAL program (device, gateway, apps) use a namespace. For example, xaal.rest,
or xaal.zwave. By convention, you can run everything just by calling the namespace
<p>Every xAAL program (device, gateway, apps) use a namespace. For example, <em>xaal.rest</em>,
or <em>xaal.zwave</em>. By convention, you can run everything just by calling the namespace
module.</p>
<pre class="code bash literal-block"><code><span class="comment single"># to run the meta data sever:
</span>$ python -m xaal.metadb
......@@ -720,9 +720,13 @@ module.</p>
<span class="comment single"># to run the dashboard (web interface)
</span>$ python -m xaal.dashboard
<span class="comment single"># to run the Zwave gateway
</span>$ python -m xaal.zwave</code></pre>
<span class="comment single"># to run the Open Weather Map gateway
</span>$ python -m xaal.owm</code></pre>
<p>Of course, you need to install packages first.</p>
<p>To reduce memory footprint, you can use the <em>xaal-pkgrun</em> command. This tool will
register every package on a single Python interpreter.</p>
<pre class="code bash literal-block"><code><span class="comment single"># to run aqara and owm gateways:
</span>$ xaal-pkgrun owm aqara</code></pre>
</div>
<div class="section" id="notes">
<h1>Notes</h1>
......
......@@ -142,7 +142,7 @@ To check devices, you can use:
# display description / attribute for all devices
$ xaal-walker
# same but on for lamp devices
# same but only for lamp devices
$ xaal-walker -t lamp.any
To turn on/off the lamp
......@@ -179,8 +179,8 @@ Right now some gateways won't work on Windows due to missing libaries (openZwave
Coding style
~~~~~~~~~~~~
Every xAAL program (device, gateway, apps) use a namespace. For example, xaal.rest,
or xaal.zwave. By convention, you can run everything just by calling the namespace
Every xAAL program (device, gateway, apps) use a namespace. For example, *xaal.rest*,
or *xaal.zwave*. By convention, you can run everything just by calling the namespace
module.
.. code-block:: bash
......@@ -196,6 +196,14 @@ module.
Of course, you need to install packages first.
To reduce memory footprint, you can use the *xaal-pkgrun* command. This tool will
register every package on a single Python interpreter.
.. code-block:: bash
# to run aqara and owm gateways:
$ xaal-pkgrun owm aqara
Notes
~~~~~
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment