[python-uk] copyright info in source
John Lee
jjl at pobox.com
Tue Sep 10 21:07:18 CEST 2013
On Tue, 10 Sep 2013, Andy Robinson wrote:
> On 9 September 2013 19:53, Russel Winder <russel at winder.org.uk> wrote:
>> The licence statement has to be in each and every individual file since
>> in UK and USA law each file is deemed a separate work.
>>
>
> Russel, thanks. That's interesting.
>
> The practical issue is "how not to forget over time". A test in a
> test suite, or a hook in a setup /release script which walks the files
> and warns you would be very useful for anyone who has to do this. We
> used to have a subversion commit hook once upon a time, but DVCS made
> it trickier.
I've seen it done in a special "coding style test suite" (that gets run
along with all the other tests). Slightly nicer than a push hook IMO
because you see it earlier and because it works the same way as all your
other automated tests of your code. There was a bit of special code so
that you got one failure per coding style violation I think (including one
per missing copyright statement), but those are bonus points.
Maybe somebody has written a test runner plugin that does that? My quick
searches didn't turn one up, though there is this, which could easily be
adapted (not a plugin, and looks like it wants to be)
http://stackoverflow.com/questions/12227443/is-there-a-plugin-for-pylint-and-pyflakes-for-nose-tests
John
More information about the python-uk
mailing list