[skeleton] Properly format debian/changelog using current datetime and author information
Reformat "context" dict to have it PEP8 compliant along the way (only white
space changes).
--- a/cubicweb/devtools/devctl.py Wed Oct 12 11:07:10 2016 +0200
+++ b/cubicweb/devtools/devctl.py Wed Oct 05 10:12:23 2016 +0200
@@ -30,6 +30,7 @@
from os import mkdir, chdir, path as osp
from warnings import warn
+from pytz import UTC
from six.moves import input
from logilab.common import STD_BLACKLIST
@@ -651,19 +652,21 @@
}
if verbose:
dependencies.update(self._ask_for_dependencies())
- context = {'cubename' : cubename,
- 'distname' : distname,
- 'shortdesc' : shortdesc,
- 'longdesc' : longdesc or shortdesc,
- 'dependencies' : dependencies,
- 'version' : cubicwebversion,
- 'year' : str(date.today().year),
- 'author': self['author'],
- 'author-email': self['author-email'],
- 'author-web-site': self['author-web-site'],
- 'license': self['license'],
- 'long-license': self.LICENSES[self['license']],
- }
+ context = {
+ 'cubename': cubename,
+ 'distname': distname,
+ 'shortdesc': shortdesc,
+ 'longdesc': longdesc or shortdesc,
+ 'dependencies': dependencies,
+ 'version': cubicwebversion,
+ 'year': str(date.today().year),
+ 'author': self['author'],
+ 'author-email': self['author-email'],
+ 'rfc2822-date': datetime.now(tz=UTC).strftime('%a, %d %b %Y %T %z'),
+ 'author-web-site': self['author-web-site'],
+ 'license': self['license'],
+ 'long-license': self.LICENSES[self['license']],
+ }
exclude = SKEL_EXCLUDE
if self['layout'] == 'simple':
exclude += ('sobjects.py*', 'precreate.py*', 'realdb_test*',
--- a/cubicweb/skeleton/debian/changelog.tmpl Wed Oct 12 11:07:10 2016 +0200
+++ b/cubicweb/skeleton/debian/changelog.tmpl Wed Oct 05 10:12:23 2016 +0200
@@ -2,5 +2,5 @@
* initial release
- --
+ -- %(author)s <%(author-email)s> %(rfc2822-date)s