Removed purple.c from watched list.
[python-purple] / README
1 python-purple - Python bindings for libpurple
2 ---------------------------------------------
3
4 Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia
5
6 Requirements
7 ------------
8
9 In order to build python-purple, you need the following packages:
10  * cdbs
11  * debhelper
12  * libpurple-dev
13  * libglib2.0-dev
14  * python2.5-dev
15  * python2.5-distutils
16  * cython (optional)
17
18 Although it's not dependent, cython should also needed if you want to
19 re-create purple.c file (generated from cython using purple.pyx).
20
21 Building and installing python-purple
22 -------------------------------------
23
24 Building cython-generated purple.c file (optional):
25
26 $ cython purple.pyx -I libpurple/
27
28 This is also done by setup.py when running:
29
30 $ python2.5 setup.py build
31
32 If you don't need to generate purple.c file, you can use setup_dist.py:
33
34 $ python2.5 setup_dist.py build
35
36 Both setups generates purple.so inside build/ directory. The difference is
37 that setup.py also generates purple.c file, if it doesn't exists.
38
39 To install files inside your system:
40
41 $ sudo python2.5 setup.py install --root=/usr
42
43 You can also create a debian package of it:
44
45 $ dpkg-buildpackage -rfakeroot
46
47 Testing python-purple
48 ---------------------
49
50 Python-purple provides a client example (nullclient) which connects to a
51 Gtalk account and displays libpurple's debug messages. In order to execute it,
52 issue the following command:
53
54 $ LD_PRELOAD=/usr/lib/libpurple.so.0 python2.5 nullclient.py
55
56 It will ask for a username and then password. Insert it and it will
57 automatically connect to the given account.
58
59 There is also another example client (nullclient-ecore), which provides some
60 callback examples from libpurple interacting with UI. In order to execute it,
61 issue the following command:
62
63 $ LD_PRELOAD=/usr/lib/libpurple.so.0 python2.5 nullclient-ecore.py
64
65 An Etk-based window will pop up showing text windows, a command entry and
66 three buttons ('Send', 'Connect', 'Add account'). In order to test it, follow
67 the steps below:
68
69 1. Click on 'Add account' button. A pop-up window appears, and you can enter
70 there a gmail-based account (e.g. jsmith@gmail.com). Click 'Ok' when done.
71
72 2. Click on 'Connect' button. A pop-up window appears asking for account's
73 password. Click 'Ok' when done.
74
75 Now wait for the account connection. When 'Connected' appears, your buddy
76 list gets updated.
77
78 3. You are now connected! Select a buddy from buddy list, write a message on
79 the command entry and click 'Send'. Your message appears in the text box.
80 If your buddy replies, his/her message also gets shown in the text box.