aboutsummaryrefslogtreecommitdiffstats
path: root/doc/developers.rst
blob: b6fe88b6481bad81d3776b748ee7612a2da15e01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Developers
==========

If you are a developer and use pyexiv2 in your project, you will find here
useful information.

Getting the code
################

pyexiv2's source code is versioned with
`bazaar <http://bazaar.canonical.com/>`_, and all the branches, including the
main development focus (sometimes referred to as *trunk*), are hosted on
`Launchpad <https://code.launchpad.net/pyexiv2>`_.

To get a working copy of the latest revision of the development branch, just
issue the following command in a terminal::

  bzr branch lp:pyexiv2

If you need to get a specific revision identified by a tag (all releases of
pyexiv2 are tagged), use the following command::

  bzr branch -r tag:tag_name lp:pyexiv2

A list of all the available tags can be obtained using the ``bzr tags``
command::

  osomon@granuja:~/dev/pyexiv2$ bzr tags
  release-0.1          60
  release-0.1.1        73
  release-0.1.2        99
  release-0.1.3        99.1.6

Dependencies
############

You will need the following dependencies installed on your system to build and
use pyexiv2:

* `Python <http://python.org/download/>`_ ≥ 2.5
* `boost.python <http://www.boost.org/libs/python/doc/>`_ ≥ 1.35
* `libexiv2 <http://exiv2.org/>`_ ≥ 0.19
* `SCons <http://scons.org/>`_

For Python, boost.python and libexiv2, the development files are needed
(-dev packages).
A typical list of packages to install on a Debian/Ubuntu system is::

  python-all-dev libboost-python-dev libexiv2-dev scons

Building and installing
#######################

Building pyexiv2 is as simple as invoking ``scons`` in the top-level directory::

  osomon@granuja:~/dev/pyexiv2$ scons
  scons: Reading SConscript files ...
  scons: done reading SConscript files.
  scons: Building targets ...
  g++ -o build/exiv2wrapper.os -c -fPIC -I/usr/include/python2.6 src/exiv2wrapper.cpp
  g++ -o build/exiv2wrapper_python.os -c -fPIC -I/usr/include/python2.6 src/exiv2wrapper_python.cpp
  g++ -o build/libexiv2python.so -shared build/exiv2wrapper.os build/exiv2wrapper_python.os -lboost_python -lexiv2
  scons: done building targets.

The result of the build process is a shared library, ``libexiv2python.so``, in
the build directory::

  osomon@granuja:~/dev/pyexiv2$ ls build/
  exiv2wrapper.os  exiv2wrapper_python.os  libexiv2python.so

To install pyexiv2 system-wide, just invoke ``scons install``.
You will most likely need administrative privileges to proceed.
The ``--user`` switch will install pyexiv2 in the current
`user site directory <http://www.python.org/dev/peps/pep-0370/>`_
(Python ≥ 2.6 is required).

Note to packagers:
if `DESTDIR <http://www.gnu.org/prep/standards/html_node/DESTDIR.html>`_ is
specified on the command line when invoking ``scons install``, its value will be
prepended to each installed target file.

Documentation
#############

The present documentation is generated using
`Sphinx <http://sphinx.pocoo.org/>`_ from reStructuredText sources found in the
doc/ directory. Invoke ``scons doc`` to (re)build the HTML documentation.
Alternatively, you can issue the following command::

  sphinx-build -b html doc/ doc/_build/

The index of the documentation will then be found under doc/_build/index.html.
Note that you will need pyexiv2 to be installed system-wide or to be found on
the ``PYTHONPATH`` for the documentation to build successfully.

Unit tests
##########

pyexiv2's source comes with a battery of unit tests, in the test/ directory.
To run them, ``cd`` to this directory and execute the ``TestsRunner.py``
script, making sure that pyexiv2 is installed system-wide or can be found on
the ``PYTHONPATH``.

Contributing
############

pyexiv2 is Free Software, meaning that you are encouraged to use it, modify it
to suit your needs, contribute back improvements, and redistribute it.

`Bugs <https://bugs.launchpad.net/pyexiv2>`_ are tracked on Launchpad.
There is a team called
`pyexiv2-developers <https://launchpad.net/~pyexiv2-developers>`_ open to anyone
interested in following development on pyexiv2. Don't hesitate to subscribe to
the team (you don't need to actually contribute!) and to the associated mailing
list.

There are several ways in which you can contribute to improve pyexiv2:

* Use it;
* Give your feedback and discuss issues and feature requests on the
  mailing list;
* Report bugs, write patches;
* Package it for your favorite distribution/OS.

When reporting a bug, don't forget to include the following information in the
report:

* version of pyexiv2
* version of libexiv2 it was compiled against
* a minimal script that reliably reproduces the issue
* a sample image file with which the bug can reliably be reproduced