skip to navigation
skip to content

update-copyright 0.6

Automatically update copyright blurbs in versioned source.

Latest Version: 0.6.2

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 its own separate project.




I’ve packaged update-copyright for Gentoo. You need layman and my wtk overlay. Install with:

# emerge -av app-portage/layman
# layman --add wtk
# emerge -av dev-util/update-copyright


update-copyright is a simple package with no external dependencies outside of the VCS commands themselves (e.g. you need git in your PATH to use the Git backend, and hg in your PATH to use the Mercurial backend).

Installing by hand

update-copyright is available as a Git repository:

$ git clone git://

See the homepage for details. To install the checkout, run the standard:

$ python install


You’ll need a project that you version with one of our supported VCSs (currently Git and Mercurial, but it should be pretty easy to add backends for other systems). You’ll also need a config file called .update-copyright.conf in your package root, which will be parsed using Python’s RawConfigParser (syntax documentation, interpolation is turned off). Your config file will look something like:

name: update-copyright
vcs: Git

authors: yes
files: yes
ignored: COPYING, README, .update-copyright.conf, .git*
pyfile: update_copyright/

short: {project} comes with ABSOLUTELY NO WARRANTY and is licensed under the GNU General Public License.
long: This file is part of {project}.

  {project} is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

  {project} is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with {project}.  If not, see <>.


A string naming your project. Replaces {project} in your copyright blurbs.
The name of your version control system.
Should generate an AUTHORS file? yes or no.
Should update copyright blurbs in versioned files? yes or no.
A comma-separated list of globs matching files that should not have copyright blurbs updated. This protects files that may accidentally caught by the blurb update algorithm.
The path of an autogenerated license module, in case your program wants to print out its copyright/licensing information. If you don’t set this option, no license module will be generated.
A list of paragraphs (separated by blank lines) containing your short copyright/license blurb. This blurb is used in the pyfile’s short_license function (see files/pyfile). This exists because some programs print a short license blurb on startup, where the full file-topping blurb may be overkill.
A list of paragraphs (separated by blank lines) containing your long copyright/license blurb. This blurb is used to replace copyright blurbs in your source files.

Incomplete VCS history

Sometimes files have authors or alterations not recorded in a project’s VCS history. You can use the author-hacks section to add authors to a file, and the year-hacks section to adjust the files original year. Author names should be pipe-separated. For example:

path/to/file: John Doe <> | Jane Smith <>

path/to/another/file: 2009

Add entries for as many files as you like. Paths should be relative to your project root. Always use forward slashes (/) to separate path elements.


Occasionally names or email addresses used when committing to the VCS will go out of date. Some VCSs have a built-in method of dealing with this (e.g. Git’s .mailmap). For those without such a VCS, you can add an aliases` section to your config file, where the option names are the canonical name of the …?. For example:

John Doe <>: John Doe | jdoe | J. Doe <>


Run the internal unit tests with:

$ nosetests --with-doctest --doctest-tests update_copyright


This project is distributed under the GNU General Public License Version 3 or greater.


W. Trevor King

File Type Py Version Uploaded on Size
update-copyright-0.6.tar.gz (md5) Source 2014-01-27 12KB