Skip to content

Commit a8a3119

Browse files
author
bibi21000
committed
Update API and docs. Add command to install and uninstall.
0 parents  commit a8a3119

172 files changed

Lines changed: 41964 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.hgignore‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
syntax: glob
2+
*.orig
3+
*.rej
4+
*~
5+
*.o
6+
*.pyc
7+
tests/*.err
8+
openzwave/*
9+
build/*
10+
python_openzwave.egg-info/*
11+
docs/_build/doctrees/*
12+
OZW_Log.txt
13+
OZW_Log.log
14+
lib/libopenzwave.cpp
15+
debian/python-openzwave
16+
17+
syntax: regexp
18+
.*\#.*\#$

‎COPYRIGHT‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
This file is part of python-openzwave project http://code.google.com/p/python-openzwave.
2+
3+
License
4+
=======
5+
6+
python-openzwave is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
python-openzwave is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with python-openzwave. If not, see http://www.gnu.org/licenses.
18+
19+
author: bibi21000 <bibi21000@gmail.com>
20+
author: maarten damen
21+
license: GPL(v3)

‎README‎

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
This is the new generation of python-openzwave.
2+
3+
python-openzwave is a python wrapper for the openzwave library.
4+
5+
Install the needed tools
6+
========================
7+
You must install mercurial and subversion to get sources of python-openzwave
8+
and openzwave. Look at the documentation of your Linux distribution to do them.
9+
10+
You need cython (at least 0.14.1) to compile the python library (libopenzwave.pyx)
11+
You need sphinx and make to make the documentation
12+
To compile the openzwave library, look at their documentation.
13+
14+
Get the sources
15+
===============
16+
After that you can download the python-openzwave code :
17+
#hg clone https://code.google.com/p/python-openzwave/
18+
19+
20+
Automatic installation
21+
======================
22+
You can build python-openzwave with the install.sh script.
23+
#./install.sh
24+
If the build process succeed, run the following command to install
25+
#sudo python setup.py install
26+
That's all
27+
You can generate some documentation using the command : ./make_doc.sh
28+
29+
Manual installation
30+
===================
31+
-Retrieve the sources of openzwave :
32+
#svn checkout http://open-zwave.googlecode.com/svn/trunk/ openzwave
33+
-Build openzwave
34+
#cd openzwave/cpp/build/linux
35+
#make
36+
#cd ../../../..
37+
-Build python-openzwave
38+
#python setup.py build
39+
-And install it if compilation succeed
40+
#sudo python setup.py install
41+
There is a copy of the openzwave's directory in /usr/local/share/python-openzwave
42+
API documentation is in /usr/local/share/doc/python-openzwave
43+
44+
Installation on debian/ubuntu
45+
=============================
46+
You need to compile and install openzwave as a package to generate python-openzwave.
47+
After that, make the python-openzwave package
48+
#dpkg-buildpackage -rfakeroot
49+
You can now install the package with
50+
#sudo dpkg -i python-openzwave*.deb
51+
API documentation is in /usr/share/doc/python-openzwave
52+
53+
Examples
54+
========
55+
Examples have not been updated and they must
56+
57+
How to contribute
58+
=================
59+
Get the sources
60+
#hg clone https://code.google.com/p/python-openzwave/
61+
62+
Developp, test, debug, test, ... :)
63+
64+
When your modification is functional, you are ready to submit a patch
65+
66+
Sync you repository :
67+
#hg pull
68+
#hg update
69+
70+
Generate the patch
71+
#hgdiff > somewordstoexplainwhatthepatchdoes.patch
72+
73+
As the code of python-openzwave is under developpment, submit atomic patches.
74+
Otherwise, you should have merge problems when syncing your repository.
75+
76+
This will generate a file in the current directory.
77+
Send it to the developpers team.
78+
79+
Static vs dynamic (or shared)
80+
=============================
81+
The openzwave (c++) lib needs to run as a singleton : it means that it
82+
MUST have only one instance of the manager running on your computer.
83+
84+
There is 2 ways of linking libraries with a program :
85+
-static : includes a copy of the library in your binary program. This means
86+
that your program has its own instance of the library. This the way the
87+
install.sh runs. So you CAN'T have another program (like the control-panel)
88+
running when using the python-openzwave library
89+
90+
-dynamic or shared : includes a link to the library in your binary program.
91+
This means that your program share the library with other programs. In this
92+
case, the instance is owned directly by the library. This the way the
93+
debian package works. So you CAN have another program running when
94+
using the python-openzwave library. Of course, this program MUST use
95+
the shared library.
96+
97+
History
98+
=======
99+
The original script was from maarten damen :
100+
https://github.com/maartendamen/python-openzwave
101+
The openzwave package is now a wrapper to access Nodes, Network, Scenes, ...
102+
To update your old code, change "import openzwave" by
103+
"import libopenzwave"

‎api_demo.sh‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash -e
2+
3+
echo "------------------------------------------------------------"
4+
echo "| Install openzwave in tmp |"
5+
echo "------------------------------------------------------------"
6+
python setup.py install --root=build/tmp
7+
8+
echo "------------------------------------------------------------"
9+
echo "| Run api_demo |"
10+
echo "------------------------------------------------------------"
11+
./examples/api_demo.py $*

‎compile.sh‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash -e
2+
3+
echo "-----------------------------------------------------------------"
4+
echo "| Retrieve sources of openzwave |"
5+
echo "-----------------------------------------------------------------"
6+
[ ! -d openzwave ] && svn checkout http://open-zwave.googlecode.com/svn/trunk/ openzwave
7+
8+
echo "-----------------------------------------------------------------"
9+
echo "| Build openzwave |"
10+
echo "-----------------------------------------------------------------"
11+
cd openzwave/cpp/build/linux
12+
make
13+
cd ../../../..
14+
15+
echo "-----------------------------------------------------------------"
16+
echo "| Build python-openzwave |"
17+
echo "-----------------------------------------------------------------"
18+
python setup.py build
19+
20+
if [ u != $(which sphinx-build)u ] ; then
21+
echo "-----------------------------------------------------------------"
22+
echo "| Make documentation |"
23+
echo "-----------------------------------------------------------------"
24+
python setup.py install --root=build/tmp
25+
cd docs
26+
make html
27+
cd ..
28+
else
29+
echo "-----------------------------------------------------------------"
30+
echo "| sphinx not found |"
31+
echo "| No documentation general |"
32+
echo "-----------------------------------------------------------------"
33+
34+
fi
35+
36+
echo "-----------------------------------------------------------------"
37+
echo "| You can now install python-openzwave |"
38+
echo "| Run the following command |"
39+
echo "| sudo ./install.sh |"
40+
echo "| Installation directories : |"
41+
echo "| config directory : /usr/local/share/python-openzwave |"
42+
if [ u != $(which sphinx-build)u ] ; then
43+
echo "| Documentation : /usr/local/share/doc/python-openzwave |"
44+
fi
45+
echo "-----------------------------------------------------------------"

‎debian/changelog‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
python-openzwave (20120828-oneiric-9) oneiric; urgency=low
2+
3+
* Automatic update from upstream
4+
5+
-- Sébastien Gallet <sgallet@gmail.com> Mon, 03 Sep 2012 10:41:59 +0200
6+
7+
python-openzwave (0.20120508) oneiric; urgency=low
8+
9+
* Initial release.
10+
11+
-- Sébastien GALLET <sgallet@gmail.com> Sun, 25 Mar 2012 19:52:41 +0100

‎debian/compat‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7

‎debian/control‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Source: python-openzwave
2+
Section: python
3+
Priority: optional
4+
Maintainer: Sébastien GALLET <sgallet@gmail.com>
5+
Build-Depends: debhelper (>= 7.0.50~), python (>= 2.6.6-3~), python-setuptools,
6+
python-dev, cython, libopenzwave1.0-dev, python-louie
7+
Standards-Version: 3.9.1
8+
Homepage: http://code.google.com/p/python-openzwave
9+
10+
Package: python-openzwave
11+
Architecture: any
12+
Depends: libopenzwave1.0, python, python-louie, ${misc:Depends}, ${python:Depends}
13+
Description: python-openzwave is another python wrapper around the openzwave project.
14+
The wrapper allows you to control a z-wave network from python.
15+
The one-to-one library is in beta state. You can try it.
16+
The new wrapper is in early developpement stage. So don't use it, but
17+
join us on http://code.google.com/p/python-openzwave.

‎debian/copyright‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Format: http://dep.debian.net/deps/dep5
2+
Upstream-Name: python-openzwave
3+
Source: http://code.google.com/p/python-openzwave
4+
5+
Files: *
6+
Copyright: (C) 2012 bibi21000 aka Sébastien GALLET <sgallet@gmail.com>
7+
License: GPL-3
8+
9+
File: debian/*
10+
Copyright: (c) 2012 Sébastien GALLET <sgallet@gmail.com>
11+
License: GPL-2
12+
13+
License: GPL-2
14+
This program is free software: you can redistribute it and/or modify
15+
it under the terms of the GNU General Public License as published by
16+
the Free Software Foundation, version 2.
17+
.
18+
This program is distributed in the hope that it will be useful,
19+
but WITHOUT ANY WARRANTY; without even the implied warranty of
20+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+
GNU General Public License for more details.
22+
.
23+
On Debian systems, the complete text of the GNU General Public License
24+
can be found in the /usr/share/common-licenses/GPL-2 file.

‎debian/docs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
README
2+
COPYRIGHT
3+
docs/_build/html

0 commit comments

Comments
 (0)