Skip to content
Snippets Groups Projects
Commit 8db257e9 authored by jkerdreu's avatar jkerdreu
Browse files

Added requirements

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@2120 b32b6428-25c9-4566-ad07-03861ab6144f
parent 9fcdbd9d
No related branches found
No related tags found
No related merge requests found
<!DOCTYPE html> <?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta charset="utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<title>xAAL Python stack</title> <title>xAAL Python stack</title>
<style type="text/css"> <style type="text/css">
/* Minimal style sheet for the HTML output of Docutils. */ /*
/* */ :Author: David Goodger (goodger@python.org)
/* :Author: Günter Milde, based on html4css1.css by David Goodger */ :Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
/* :Id: $Id: minimal.css 8036 2017-02-14 13:05:46Z milde $ */ :Copyright: This stylesheet has been placed in the public domain.
/* :Copyright: © 2015 Günter Milde. */
/* :License: Released under the terms of the `2-Clause BSD license`_, */
/* in short: */
/* */
/* Copying and distribution of this file, with or without modification, */
/* are permitted in any medium without royalty provided the copyright */
/* notice and this notice are preserved. */
/* */
/* This file is offered as-is, without any warranty. */
/* */
/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
/* This CSS2.1_ stylesheet defines rules for Docutils elements without */
/* HTML equivalent. It is required to make the document semantic visible. */
/* */
/* .. _CSS2.1: http://www.w3.org/TR/CSS2 */
/* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */
/* alignment of text and inline objects inside block objects*/
.align-left { text-align: left; }
.align-right { text-align: right; }
.align-center { clear: both; text-align: center; }
.align-top { vertical-align: top; }
.align-middle { vertical-align: middle; }
.align-bottom { vertical-align: bottom; }
/* titles */
h1.title, p.subtitle {
text-align: center;
}
p.admonition-title,
p.topic-title,
p.sidebar-title,
p.rubric,
p.system-message-title {
font-weight: bold;
}
h1 + p.subtitle,
h1 + p.section-subtitle {
font-size: 1.6em;
}
h2 + p.section-subtitle { font-size: 1.28em; }
p.subtitle,
p.section-subtitle,
p.sidebar-subtitle {
font-weight: bold;
margin-top: -0.5em;
}
p.sidebar-title,
p.rubric {
font-size: larger;
}
p.rubric { color: maroon; }
a.toc-backref {
color: black;
text-decoration: none; }
/* Warnings, Errors */
div.caution p.admonition-title,
div.attention p.admonition-title,
div.danger p.admonition-title,
div.error p.admonition-title,
div.warning p.admonition-title,
div.system-messages h1,
div.error,
span.problematic,
p.system-message-title {
color: red;
}
/* inline literals */ Default cascading style sheet for the HTML output of Docutils.
span.docutils.literal {
font-family: monospace;
white-space: pre-wrap;
}
/* do not wraph at hyphens and similar: */
.literal > span.pre { white-space: nowrap; }
/* Lists */
/* compact and simple lists: no margin between items */
.simple li, .compact li,
.simple ul, .compact ul,
.simple ol, .compact ol,
.simple > li p, .compact > li p,
dl.simple > dd, dl.compact > dd {
margin-top: 0;
margin-bottom: 0;
}
/* Table of Contents */ See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
div.topic.contents { margin: 0; } customize this style sheet.
ul.auto-toc { */
list-style-type: none;
padding-left: 1.5em; }
/* Enumerated Lists */
ol.arabic { list-style: decimal }
ol.loweralpha { list-style: lower-alpha }
ol.upperalpha { list-style: upper-alpha }
ol.lowerroman { list-style: lower-roman }
ol.upperroman { list-style: upper-roman }
dt span.classifier { font-style: italic }
dt span.classifier:before {
font-style: normal;
margin: 0.5em;
content: ":";
}
/* Field Lists and drivatives */ /* used to remove borders from tables and images */
/* bold field name, content starts on the same line */ .borderless, table.borderless td, table.borderless th {
dl.field-list > dt, border: 0 }
dl.option-list > dt,
dl.docinfo > dt,
dl.footnote > dt,
dl.citation > dt {
font-weight: bold;
clear: left;
float: left;
margin: 0;
padding: 0;
padding-right: 0.5em;
}
/* Offset for field content (corresponds to the --field-name-limit option) */
dl.field-list > dd,
dl.option-list > dd,
dl.docinfo > dd {
margin-left: 9em; /* ca. 14 chars in the test examples */
}
/* start field-body on a new line after long field names */
dl.field-list > dd > *:first-child,
dl.option-list > dd > *:first-child
{
display: inline-block;
width: 100%;
margin: 0;
}
/* field names followed by a colon */
dl.field-list > dt:after,
dl.docinfo > dt:after {
content: ":";
}
/* Bibliographic Fields (docinfo) */ table.borderless td, table.borderless th {
pre.address { font: inherit; } /* Override padding for "table.docutils td" with "! important".
dd.authors > p { margin: 0; } The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
/* Option Lists */
dl.option-list { margin-left: 40px; } .first {
dl.option-list > dt { font-weight: normal; } /* Override more specific margin styles with "! important". */
span.option { white-space: nowrap; } margin-top: 0 ! important }
/* Footnotes and Citations */ .last, .with-subtitle {
dl.footnote.superscript > dd {margin-left: 1em; } margin-bottom: 0 ! important }
dl.footnote.brackets > dd {margin-left: 2em; }
dl > dt.label { font-weight: normal; } .hidden {
a.footnote-reference.brackets:before, display: none }
dt.label > span.brackets:before { content: "["; }
a.footnote-reference.brackets:after, .subscript {
dt.label > span.brackets:after { content: "]"; } vertical-align: sub;
a.footnote-reference.superscript, font-size: smaller }
dl.footnote.superscript > dt.label {
.superscript {
vertical-align: super; vertical-align: super;
font-size: smaller; font-size: smaller }
}
dt.label > span.fn-backref { margin-left: 0.2em; }
dt.label > span.fn-backref > a { font-style: italic; }
/* Line Blocks */ a.toc-backref {
div.line-block { display: block; } text-decoration: none ;
div.line-block div.line-block { color: black }
margin-top: 0;
margin-bottom: 0;
margin-left: 40px;
}
/* Figures, Images, and Tables */ blockquote.epigraph {
.figure.align-left, margin: 2em 5em ; }
img.align-left,
object.align-left,
table.align-left {
margin-right: auto;
}
.figure.align-center,
img.align-center,
object.align-center {
margin-left: auto;
margin-right: auto;
display: block;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.figure.align-right,
img.align-right,
object.align-right,
table.align-right {
margin-left: auto;
}
/* reset inner alignment in figures and tables */
/* div.align-left, div.align-center, div.align-right, */
table.align-left, table.align-center, table.align-right
{ text-align: inherit }
/* Admonitions and System Messages */
div.admonition,
div.system-message,
div.sidebar{
margin: 40px;
border: medium outset;
padding-right: 1em;
padding-left: 1em;
}
/* Sidebar */ dl.docutils dd {
div.sidebar { margin-bottom: 0.5em }
width: 30%;
max-width: 26em;
float: right;
clear: right;
}
/* Text Blocks */ object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
div.topic, overflow: hidden;
pre.literal-block,
pre.doctest-block,
pre.math,
pre.code {
margin-right: 40px;
margin-left: 40px;
} }
pre.code .ln { color: gray; } /* line numbers */
/* Tables */
table { border-collapse: collapse; }
td, th {
border-style: solid;
border-color: silver;
padding: 0 1ex;
border-width: thin;
}
td > p:first-child, th > p:first-child { margin-top: 0; }
td > p, th > p { margin-bottom: 0; }
table > caption { /* Uncomment (and remove this text!) to get bold-faced definition list terms
text-align: left; dl.docutils dt {
margin-bottom: 0.25em font-weight: bold }
} */
table.borderless td, table.borderless th { div.abstract {
border: 0; margin: 2em 5em }
padding: 0;
padding-right: 0.5em /* separate table cells */
}
</style> div.abstract p.topic-title {
<style type="text/css"> font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
/* CSS31_ style sheet for the output of Docutils HTML writers. */ div.dedication {
/* Rules for easy reading and pre-defined style variants. */ margin: 2em 5em ;
/* */ text-align: center ;
/* :Author: Günter Milde, based on html4css1.css by David Goodger */ font-style: italic }
/* :Id: $Id: plain.css 8120 2017-06-22 21:02:40Z milde $ */
/* :Copyright: © 2015 Günter Milde. */
/* :License: Released under the terms of the `2-Clause BSD license`_, */
/* in short: */
/* */
/* Copying and distribution of this file, with or without modification, */
/* are permitted in any medium without royalty provided the copyright */
/* notice and this notice are preserved. */
/* */
/* This file is offered as-is, without any warranty. */
/* */
/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
/* .. _CSS3: http://www.w3.org/TR/CSS3 */
/* Document Structure */
/* ****************** */
/* "page layout" */
body {
padding: 0 5%;
margin: 8px 0;
}
div.document {
line-height:1.3;
counter-reset: table;
/* counter-reset: figure; */
/* avoid long lines --> better reading */
/* OTOH: lines should not be too short because of missing hyphenation, */
max-width: 50em;
margin: auto;
}
/* Sections */ div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
/* Transitions */ div.figure {
margin-left: 2em ;
margin-right: 2em }
hr.docutils { div.footer, div.header {
width: 80%;
margin-top: 1em;
margin-bottom: 1em;
clear: both; clear: both;
} font-size: smaller }
/* Paragraphs */ div.line-block {
/* ========== */ display: block ;
margin-top: 1em ;
margin-bottom: 1em }
/* vertical space (parskip) */ div.line-block div.line-block {
p, ol, ul, dl, margin-top: 0 ;
div.line-block, margin-bottom: 0 ;
table{ margin-left: 1.5em }
margin-top: 0.5em;
margin-bottom: 0.5em;
}
h1, h2, h3, h4, h5, h6,
dl > dd {
margin-bottom: 0.5em;
}
/* Lists */ div.sidebar {
/* ========== */ margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
/* Definition Lists */ div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
dl > dd > p:first-child { margin-top: 0; } div.system-messages {
/* :last-child is not part of CSS 2.1 (introduced in CSS 3) */ margin: 5em }
dl > dd > p:last-child { margin-bottom: 0; }
/* lists nested in definition lists */ div.system-messages h1 {
/* :only-child is not part of CSS 2.1 (introduced in CSS 3) */ color: red }
dd > ul:only-child, dd > ol:only-child { padding-left: 1em; }
/* Description Lists */ div.system-message {
/* styled like in most dictionaries, encyclopedias etc. */ border: medium outset ;
dl.description > dt { padding: 1em }
font-weight: bold;
clear: left;
float: left;
margin: 0;
padding: 0;
padding-right: 0.5em;
}
/* Field Lists */ div.system-message p.system-message-title {
color: red ;
font-weight: bold }
/* example for custom field-name width */ div.topic {
dl.field-list.narrow > dd { margin: 2em }
margin-left: 5em;
}
/* run-in: start field-body on same line after long field names */
dl.field-list.run-in > dd p {
display: block;
}
/* Bibliographic Fields */ h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
/* generally, bibliographic fields use special definition list dl.docinfo */ h1.title {
/* but dedication and abstract are placed into "topic" divs */ text-align: center }
div.abstract p.topic-title {
text-align: center;
}
div.dedication {
margin: 2em 5em;
text-align: center;
font-style: italic;
}
div.dedication p.topic-title {
font-style: normal;
}
/* Citations */ h2.subtitle {
dl.citation dt.label { text-align: center }
font-weight: bold;
}
span.fn-backref {
font-weight: normal;
}
/* Text Blocks */ hr.docutils {
/* ============ */ width: 75% }
/* Literal Blocks */ img.align-left, .figure.align-left, object.align-left, table.align-left {
pre.literal-block, pre.doctest-block, clear: left ;
pre.math, pre.code { float: left ;
margin-left: 1.5em; margin-right: 1em }
margin-right: 1.5em
}
/* Block Quotes */ img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
blockquote, img.align-center, .figure.align-center, object.align-center {
div.topic { display: block;
margin-left: 1.5em; margin-left: auto;
margin-right: 1.5em margin-right: auto;
}
blockquote > table,
div.topic > table {
margin-top: 0;
margin-bottom: 0;
} }
blockquote p.attribution,
div.topic p.attribution { table.align-center {
text-align: right; margin-left: auto;
margin-left: 20%; margin-right: auto;
} }
/* Tables */ .align-left {
/* ====== */ text-align: left }
/* th { vertical-align: bottom; } */ .align-center {
clear: both ;
text-align: center }
table tr { text-align: left; } .align-right {
text-align: right }
/* "booktabs" style (no vertical lines) */ /* reset inner alignment in figures */
table.booktabs { div.align-right {
border: 0; text-align: inherit }
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.booktabs * {
border: 0;
}
table.booktabs th {
border-bottom: thin solid;
}
/* numbered tables (counter defined in div.document) */ /* div.align-center * { */
table.numbered > caption:before { /* text-align: left } */
counter-increment: table;
content: "Table " counter(table) ": ";
font-weight: bold;
}
/* Explicit Markup Blocks */ .align-top {
/* ====================== */ vertical-align: top }
/* Footnotes and Citations */ .align-middle {
/* ----------------------- */ vertical-align: middle }
/* line on the left */ .align-bottom {
dl.footnote { vertical-align: bottom }
padding-left: 1ex;
border-left: solid;
border-left-width: thin;
}
/* Directives */ ol.simple, ul.simple {
/* ---------- */ margin-bottom: 1em }
/* Body Elements */ ol.arabic {
/* ~~~~~~~~~~~~~ */ list-style: decimal }
/* Images and Figures */ ol.loweralpha {
list-style: lower-alpha }
/* let content flow to the side of aligned images and figures */ ol.upperalpha {
.figure.align-left, list-style: upper-alpha }
img.align-left,
object.align-left {
display: block;
clear: left;
float: left;
margin-right: 1em
}
.figure.align-right,
img.align-right,
object.align-right {
display: block;
clear: right;
float: right;
margin-left: 1em
}
/* Stop floating sidebars, images and figures at section level 1,2,3 */
h1, h2, h3 { clear: both; }
/* Sidebar */ ol.lowerroman {
list-style: lower-roman }
/* Move into the margin. In a layout with fixed margins, */ ol.upperroman {
/* it can be moved into the margin completely. */ list-style: upper-roman }
div.sidebar {
width: 30%; p.attribution {
max-width: 26em; text-align: right ;
margin-left: 1em; margin-left: 50% }
margin-right: -5.5%;
background-color: #ffffee ; p.caption {
} font-style: italic }
/* Code */ p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee } pre.code, code { background-color: #eeeeee }
pre.code .ln { color: gray; } /* line numbers */
/* basic highlighting: for a complete scheme, see */
/* http://docutils.sourceforge.net/sandbox/stylesheets/ */
pre.code .comment, code .comment { color: #5C6576 } pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 } pre.code .literal.string, code .literal.string { color: #0C5404 }
...@@ -514,50 +284,78 @@ pre.code .name.builtin, code .name.builtin { color: #352B84 } ...@@ -514,50 +284,78 @@ pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1} pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289} pre.code .inserted, code .inserted { background-color: #A3D289}
/* Math */ span.classifier {
/* styled separately (see math.css for math-output=HTML) */ font-family: sans-serif ;
font-style: oblique }
/* Epigraph */ span.classifier-delimiter {
/* Highlights */ font-family: sans-serif ;
/* Pull-Quote */ font-weight: bold }
/* Compound Paragraph */
/* Container */
/* can be styled in a custom stylesheet */ span.interpreted {
font-family: sans-serif }
/* Document Header and Footer */ span.option {
white-space: nowrap }
div.footer, div.header { span.pre {
clear: both; white-space: pre }
font-size: smaller;
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
} }
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
/* Inline Markup */ ul.auto-toc {
/* ============= */ list-style-type: none }
/* Emphasis */
/* em */
/* Strong Emphasis */
/* strong */
/* Interpreted Text */
/* span.interpreted */
/* Title Reference */
/* cite */
/* Inline Literals */
/* possible values: normal, nowrap, pre, pre-wrap, pre-line */
/* span.docutils.literal { white-space: pre-wrap; } */
/* Hyperlink References */
a { text-decoration: none; }
/* External Targets */
/* span.target.external */
/* Internal Targets */
/* span.target.internal */
/* Footnote References */
/* a.footnote-reference */
/* Citation References */
/* a.citation-reference */
</style> </style>
</head> </head>
...@@ -565,65 +363,123 @@ a { text-decoration: none; } ...@@ -565,65 +363,123 @@ a { text-decoration: none; }
<div class="document" id="xaal-python-stack"> <div class="document" id="xaal-python-stack">
<h1 class="title">xAAL Python stack</h1> <h1 class="title">xAAL Python stack</h1>
<div class="section" id="requirements">
<h1>Requirements</h1>
<p>To install xAAL for Python, you need Python3. Python version 3 isn't mandatory
but highly recommended (some parts haven't be tested with Python 2 since a while).
Install the following packages:</p>
<blockquote>
<ul class="simple">
<li>subversion</li>
<li>python3-dev</li>
<li>libsodium-dev</li>
</ul>
</blockquote>
<p>For Debian / Ubuntu users:</p>
<pre class="code bash literal-block">
$ apt-get install subversion python3-dev libsodium-dev
</pre>
</div>
<div class="section" id="install"> <div class="section" id="install">
<h1>Install</h1> <h1>Install</h1>
<p>Right now, there is no public release (pip based) of xAAL Python binding, so <p>Right now, there is no public release (pip based) of xAAL Python binding, so
you have to install things from SVN or archive.</p> you have to install things from SVN or archive.</p>
<p>You can use virtualenv (recommended). Python 3 version isn't mandatory but <p>You can use virtualenv (recommended).</p>
highly recommended (some parts haven't be tested with Python 2 since a while).</p>
<p>First build a virtualenv :</p> <p>First build a virtualenv :</p>
<pre class="code bash literal-block"><code>$ virtualenv3 xaal_env <pre class="code bash literal-block">
$ <span class="name builtin">source</span> xaal_env/bin/activate</code></pre> $ virtualenv3 xaal_env <span class="operator">(</span>or python3 -m virtualenv --python<span class="operator">=</span>python3 xaal_env<span class="operator">)</span>
$ <span class="name builtin">source</span> xaal_env/bin/activate
</pre>
<p>Every time, you want to use the binding, you must source the activate script.</p> <p>Every time, you want to use the binding, you must source the activate script.</p>
<p>Download source files from SVN:</p> <p>Download source files from SVN:</p>
<pre class="code bash literal-block"><code>$ svn checkout https://redmine.telecom-bretagne.eu/svn/xaal/code/Python/trunk/ xaal_svn</code></pre> <pre class="code bash literal-block">
$ svn checkout https://redmine.telecom-bretagne.eu/svn/xaal/code/Python/trunk/ xaal_svn
</pre>
<p>First, install the xaal.lib package:</p> <p>First, install the xaal.lib package:</p>
<pre class="code bash literal-block"><code>$ <span class="name builtin">cd</span> xaal_svn/libs/lib/ <pre class="code bash literal-block">
$ python setup.py develop</code></pre> $ <span class="name builtin">cd</span> xaal_svn/libs/lib/
<p>Install the monitor lib (needed for Dashboard, REST API..)</p> $ python setup.py develop
<pre class="code bash literal-block"><code>$ <span class="name builtin">cd</span> xaal_svn/libs/monitor/ </pre>
$ python setup.py develop</code></pre> <p>Install the monitor lib (needed by Dashboard, REST API..)</p>
<pre class="code bash literal-block">
$ <span class="name builtin">cd</span> xaal_svn/libs/monitor/
$ python setup.py develop
</pre>
<p>Install the schemas (needed by some devices)</p>
<pre class="code bash literal-block">
$ <span class="name builtin">cd</span> xaal_svn/libs/schemas/
$ python setup.py develop
</pre>
<p>Install the tools</p> <p>Install the tools</p>
<pre class="code bash literal-block"><code>$ <span class="name builtin">cd</span> xaal_svn/apps/tools <pre class="code bash literal-block">
$ python setup.py develop</code></pre> $ <span class="name builtin">cd</span> xaal_svn/apps/tools
$ python setup.py develop
</pre>
<p>You can use the <em>python setup.py</em> install instead of develop, but modification <p>You can use the <em>python setup.py</em> install instead of develop, but modification
to source files, won't be applied, you have to re-install it. Right now develop, to source files, won't be applied, you have to re-install it. Right now develop,
is the best option.</p> is the best option.</p>
<p>Create the configuration files in your home directory:</p> <p>Create the configuration files in your home directory:</p>
<pre class="code bash literal-block"><code>$ mkdir ~/.xaal/ <pre class="code bash literal-block">
$ mkdir ~/.xaal/
$ cp xaal_svn/libs/lib/xaal.ini.sample ~/.xaal/xaal.ini $ cp xaal_svn/libs/lib/xaal.ini.sample ~/.xaal/xaal.ini
$ xaal-keygen</code></pre> $ xaal-keygen
</pre>
<p>xaal-keygen will compute an key for a given passphrase. Edit the xaal.ini <p>xaal-keygen will compute an key for a given passphrase. Edit the xaal.ini
file according to your needs.</p> file according to your needs.</p>
</div> </div>
<div class="section" id="test"> <div class="section" id="test">
<h1>Test</h1> <h1>Test</h1>
<p>First, you can launch a message dumper with this tools</p> <p>First, you can launch a message dumper with this tools</p>
<pre class="code bash literal-block"><code>$ xaal-dumper <pre class="code bash literal-block">
$ or xaal-tail <span class="literal number">0</span></code></pre> $ xaal-dumper
$ or xaal-tail <span class="literal number">0</span>
</pre>
<p>To start an fake lamp:</p> <p>To start an fake lamp:</p>
<pre class="code bash literal-block"><code>$ <span class="name builtin">cd</span> xaal_svn/devices/test/DummyDevices/ <pre class="code bash literal-block">
$ python lamp.py</code></pre> $ <span class="name builtin">cd</span> xaal_svn/devices/test/DummyDevices/
$ python lamp.py
</pre>
<p>To search for devices, you can use:</p> <p>To search for devices, you can use:</p>
<pre class="code bash literal-block"><code>$ xaal-isalive <pre class="code bash literal-block">
$ xaal-isalive
$ xaal-isalive lamp.basic
$ xaal-isalive lamp.any
$ xaal-info xxxxxxxxxxxxxx &lt;- uuid $ xaal-info xxxxxxxxxxxxxx &lt;- uuid
$ xaal-walker</code></pre> $ xaal-walker
$ xaal-walker lamp.any
</pre>
</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
module.</p>
<pre class="code bash literal-block">
<span class="comment single"># to run the meta data sever:
</span>$ python -m xaal.metadb
<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
</pre>
<p>Of course, you find need to install needed packages.</p>
</div> </div>
<div class="section" id="notes"> <div class="section" id="notes">
<h1>Notes</h1> <h1>Notes</h1>
<ul class="simple"> <ul class="simple">
<li><p>If you use xAAL on multiple hosts, take care of the system clock. xAAL use <li>If you use xAAL on multiple hosts, take care of the system clock. xAAL use
date/time to cypher the messages. If clocks differs, you will receive an error date/time to cypher the messages. If clocks differs, you will receive an error
message about a &quot;replay attack&quot;. In production, NTP is your best friend. A window message about a &quot;replay attack&quot;. In production, NTP is your best friend. A window
of 1 minutes is accepted, but no more.</p></li> of 1 minutes is accepted, but no more.</li>
</ul> </ul>
</div> </div>
<div class="section" id="faq"> <div class="section" id="faq">
<h1>FAQ</h1> <h1>FAQ</h1>
<ul> <ul>
<li><p>Python terminated by signal SIGSEGV: You probably forgot to setup the key in <li><p class="first">Python terminated by signal SIGSEGV: You probably forgot to setup the key in
config file.</p></li> config file.</p>
<li><p>Configuration files are hard to read / edit. Why don't you use YAML or XXML </li>
<li><p class="first">Configuration files are hard to read / edit. Why don't you use YAML or XXML
for config ?</p> for config ?</p>
<p>First, we need something that support nested config so we can <p>First, we need something that support nested config so we can
not use ConfigParser. Next, we tested severals YAML packages, but they are not use ConfigParser. Next, we tested severals YAML packages, but they are
......
...@@ -3,14 +3,28 @@ ...@@ -3,14 +3,28 @@
xAAL Python stack xAAL Python stack
================= =================
Requirements
~~~~~~~~~~~~
To install xAAL for Python, you need Python3. Python version 3 isn't mandatory
but highly recommended (some parts haven't be tested with Python 2 since a while).
Install the following packages:
- subversion
- python3-dev
- libsodium-dev
For Debian / Ubuntu users:
.. code-block:: bash
$ apt-get install subversion python3-dev libsodium-dev
Install Install
~~~~~~~ ~~~~~~~
Right now, there is no public release (pip based) of xAAL Python binding, so Right now, there is no public release (pip based) of xAAL Python binding, so
you have to install things from SVN or archive. you have to install things from SVN or archive.
You can use virtualenv (recommended). Python 3 version isn't mandatory but You can use virtualenv (recommended).
highly recommended (some parts haven't be tested with Python 2 since a while).
First build a virtualenv : First build a virtualenv :
...@@ -34,13 +48,21 @@ First, install the xaal.lib package: ...@@ -34,13 +48,21 @@ First, install the xaal.lib package:
$ cd xaal_svn/libs/lib/ $ cd xaal_svn/libs/lib/
$ python setup.py develop $ python setup.py develop
Install the monitor lib (needed for Dashboard, REST API..) Install the monitor lib (needed by Dashboard, REST API..)
.. code-block:: bash .. code-block:: bash
$ cd xaal_svn/libs/monitor/ $ cd xaal_svn/libs/monitor/
$ python setup.py develop $ python setup.py develop
Install the schemas (needed by some devices)
.. code-block:: bash
$ cd xaal_svn/libs/schemas/
$ python setup.py develop
Install the tools Install the tools
.. code-block:: bash .. code-block:: bash
...@@ -84,8 +106,11 @@ To search for devices, you can use: ...@@ -84,8 +106,11 @@ To search for devices, you can use:
.. code-block:: bash .. code-block:: bash
$ xaal-isalive $ xaal-isalive
$ xaal-isalive lamp.basic
$ xaal-isalive lamp.any
$ xaal-info xxxxxxxxxxxxxx <- uuid $ xaal-info xxxxxxxxxxxxxx <- uuid
$ xaal-walker $ xaal-walker
$ xaal-walker lamp.any
Coding style Coding style
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment