aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-11-16 14:43:35 +0000
committerAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-11-16 14:43:35 +0000
commit963828113c269681e1b9fea97924a4413c558ce7 (patch)
tree92ca345e37f3f8f37c7c8fb16845700192ef53da
parent2f7bde898437a912f36b42b94124d95ca03ee407 (diff)
downloadpaludis-963828113c269681e1b9fea97924a4413c558ce7.tar.gz
paludis-963828113c269681e1b9fea97924a4413c558ce7.tar.xz
(python) Do about like in C++. Fixes: ticket:440
-rwxr-xr-xdoc/api/python/example_about.py3
-rw-r--r--python/about.cc6
2 files changed, 5 insertions, 4 deletions
diff --git a/doc/api/python/example_about.py b/doc/api/python/example_about.py
index cd4738c..1ca297f 100755
--- a/doc/api/python/example_about.py
+++ b/doc/api/python/example_about.py
@@ -5,7 +5,8 @@
import paludis
-print "Built using Paludis " + paludis.VERSION + paludis.VERSION_SUFFIX,
+print("Built using Paludis " + str(paludis.VERSION_MAJOR) + "." + str(paludis.VERSION_MINOR) +
+ "." + str(paludis.VERSION_MICRO) + paludis.VERSION_SUFFIX),
if paludis.SUBVERSION_REVISION:
print 'r' + paludis.SUBVERSION_REVISION
diff --git a/python/about.cc b/python/about.cc
index b0aac89..93a20cf 100644
--- a/python/about.cc
+++ b/python/about.cc
@@ -28,9 +28,9 @@ namespace bp = boost::python;
void expose_about()
{
bp::scope s;
- s.attr("VERSION_MAJOR") = stringify(PALUDIS_VERSION_MAJOR);
- s.attr("VERSION_MINOR") = stringify(PALUDIS_VERSION_MINOR);
- s.attr("VERSION_MICRO") = stringify(PALUDIS_VERSION_MICRO);
+ s.attr("VERSION_MAJOR") = PALUDIS_VERSION_MAJOR;
+ s.attr("VERSION_MINOR") = PALUDIS_VERSION_MINOR;
+ s.attr("VERSION_MICRO") = PALUDIS_VERSION_MICRO;
s.attr("VERSION") = stringify(PALUDIS_VERSION_MAJOR) + "."
+ stringify(PALUDIS_VERSION_MINOR) + "." + stringify(PALUDIS_VERSION_MICRO);
s.attr("VERSION_SUFFIX") = stringify(PALUDIS_VERSION_SUFFIX);