From: W. Trevor King Date: Sun, 25 Mar 2012 12:20:06 +0000 (-0400) Subject: Fix reStructuredText markup for `` */`` in the README. X-Git-Tag: v0.4~1 X-Git-Url: http://git.tremily.us/?p=update-copyright.git;a=commitdiff_plain;h=726e572a12f2e34f5e348bf9386c7c8b867c9128 Fix reStructuredText markup for `` */`` in the README. Use a nonbreaking space so that rst knows the first `` is the start of a literal block. Because I used a unicode nbsp, adjust setup.py to appropriately import the long_description. Note that this means you'll have to use Python 3 for registering the package. --- diff --git a/README b/README index 995c192..a8d6377 100644 --- a/README +++ b/README @@ -1,3 +1,5 @@ +.. -*- coding: utf-8 -*- + ``update-copyright`` is an automatic copyright updating tool. I wrote the original for `Bugs Everywhere`_, but ended up copying it into a number of my projects. Copying is bad, so here it is, split out as @@ -118,7 +120,7 @@ While the above works well for languages that use ``#`` to mark comment lines, it doesn't work for languages like C that use ``/*…*/`` to mark comments. There blurb-update algorithm also looks for any lines that begging with ``/* Copyright`` and replaces that line, and -subsequent lines up to one beginning with `` */``, with a new blurb. +subsequent lines up to one beginning with `` */``, with a new blurb. Because I've never seen a file with *both* trigger lines, it shouldn't be a problem to run both against each of your versioned files. If it diff --git a/setup.py b/setup.py index b4d3c07..8bd35a1 100644 --- a/setup.py +++ b/setup.py @@ -18,6 +18,7 @@ "Automatically update copyright blurbs in versioned source." +import codecs as _codecs from distutils.core import setup as _setup import os.path as _os_path @@ -45,7 +46,8 @@ _setup( license = 'GNU General Public License (GPL)', platforms = ['all'], description = __doc__, - long_description=open(_os_path.join(_this_dir, 'README'), 'r').read(), + long_description=_codecs.open( + _os_path.join(_this_dir, 'README'), 'r', encoding='utf-8').read(), classifiers = filter(None, classifiers.split('\n')), scripts = ['bin/update-copyright.py'], packages = ['update_copyright', 'update_copyright.vcs'],