aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2009-01-09 20:26:08 +0100
committerOlivier Tilloy <olivier@tilloy.net>2009-01-09 20:26:08 +0100
commit7e438eae3bc03451ecebd8690496ace9005988b7 (patch)
tree72ed867fd7b0a855be3035d2e367b66aec5f529d
parente01497fc943963a82c7c84ef94798e6e43027198 (diff)
downloadpyexiv2-7e438eae3bc03451ecebd8690496ace9005988b7.tar.gz
Module attributes for the versions of exiv2 and pyexiv2.
-rw-r--r--src/exiv2wrapper_python.cpp10
-rw-r--r--src/pyexiv2.py6
2 files changed, 16 insertions, 0 deletions
diff --git a/src/exiv2wrapper_python.cpp b/src/exiv2wrapper_python.cpp
index 1dd360c..b28c2cf 100644
--- a/src/exiv2wrapper_python.cpp
+++ b/src/exiv2wrapper_python.cpp
@@ -26,14 +26,24 @@
#include "exiv2wrapper.hpp"
+#include "exiv2/exv_conf.h"
+#include "exiv2/version.hpp"
+
#include <boost/python.hpp>
using namespace boost::python;
using namespace exiv2wrapper;
+boost::python::tuple exiv2_version = \
+ boost::python::make_tuple(EXIV2_MAJOR_VERSION,
+ EXIV2_MINOR_VERSION,
+ EXIV2_PATCH_VERSION);
+
BOOST_PYTHON_MODULE(libexiv2python)
{
+ scope().attr("__exiv2_version__") = exiv2_version;
+
register_exception_translator<Exiv2::Error>(&translateExiv2Error);
// Exported method names prefixed by "_Image__" are going to be "private"
diff --git a/src/pyexiv2.py b/src/pyexiv2.py
index cd13a5c..e37076a 100644
--- a/src/pyexiv2.py
+++ b/src/pyexiv2.py
@@ -64,6 +64,12 @@ import time
import datetime
import re
+
+__version__ = (0, 2, 1)
+
+__exiv2_version__ = libexiv2python.__exiv2_version__
+
+
class FixedOffset(datetime.tzinfo):
"""