summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Jehannet <julien.jehannet@logilab.fr>2010-06-15 19:27:08 +0200
committerJulien Jehannet <julien.jehannet@logilab.fr>2010-06-15 19:27:08 +0200
commit26fa435967515a73138bbca2ac71754335d85aba (patch)
tree67c1d84be0f0bb86d718737aa6d8ca867d91ceaa
parent9920b06f8c5019ff8806a12ed3d89b7a65fab299 (diff)
parent70c95c5a8b3a259567afa7e0c5efbf961e26abac (diff)
downloadlogilab-common-26fa435967515a73138bbca2ac71754335d85aba.tar.gz
merge stable head
-rw-r--r--__pkginfo__.py2
-rw-r--r--optik_ext.py14
-rw-r--r--test/data/deprecation.py4
-rw-r--r--test/unittest_deprecation.py5
4 files changed, 15 insertions, 10 deletions
diff --git a/__pkginfo__.py b/__pkginfo__.py
index 8f20807..00248a2 100644
--- a/__pkginfo__.py
+++ b/__pkginfo__.py
@@ -27,7 +27,7 @@ version = '.'.join([str(num) for num in numversion])
license = 'LGPL' # 2.1 or later
author = "Logilab"
-author_email = "devel@logilab.fr"
+author_email = "contact@logilab.fr"
description = "collection of low-level Python packages and modules used by Logilab projects"
web = "http://www.logilab.org/project/%s" % distname
diff --git a/optik_ext.py b/optik_ext.py
index ba2c3a5..44d0504 100644
--- a/optik_ext.py
+++ b/optik_ext.py
@@ -353,21 +353,25 @@ class ManHelpFormatter(HelpFormatter):
''' % (pgm, long_desc.strip())
def format_tail(self, pkginfo):
- return '''.SH SEE ALSO
+ tail = '''.SH SEE ALSO
/usr/share/doc/pythonX.Y-%s/
-.SH COPYRIGHT
-%s
-
.SH BUGS
Please report bugs on the project\'s mailing list:
%s
.SH AUTHOR
%s <%s>
-''' % (getattr(pkginfo, 'debian_name', pkginfo.modname), pkginfo.copyright,
+''' % (getattr(pkginfo, 'debian_name', pkginfo.modname),
pkginfo.mailinglist, pkginfo.author, pkginfo.author_email)
+ if hasattr(pkginfo, "copyright"):
+ tail += '''
+.SH COPYRIGHT
+%s
+''' % pkginfo.copyright
+
+ return tail
def generate_manpage(optparser, pkginfo, section=1, stream=sys.stdout, level=0):
"""generate a man page from an optik parser"""
diff --git a/test/data/deprecation.py b/test/data/deprecation.py
new file mode 100644
index 0000000..be3b103
--- /dev/null
+++ b/test/data/deprecation.py
@@ -0,0 +1,4 @@
+# placeholder used by unittest_deprecation
+
+def moving_target():
+ pass
diff --git a/test/unittest_deprecation.py b/test/unittest_deprecation.py
index 681955b..d6da10a 100644
--- a/test/unittest_deprecation.py
+++ b/test/unittest_deprecation.py
@@ -22,8 +22,6 @@ import warnings
from logilab.common.testlib import TestCase, unittest_main
from logilab.common import deprecation
-def moving_target():
- pass
class RawInputTC(TestCase):
@@ -67,8 +65,7 @@ class RawInputTC(TestCase):
any_func()
def test_moved(self):
- # this test needs l.c.test.__init__
- module = 'logilab.common.test.unittest_deprecation'
+ module = 'data.deprecation'
any_func = deprecation.moved(module, 'moving_target')
any_func()