lazy copyright range

This commit is contained in:
Radovan Bast 2015-09-15 23:04:30 +02:00
parent 60e2c4dc75
commit 9646992050

View File

@ -2,6 +2,7 @@
import os
import sys
import datetime
from collections import OrderedDict, namedtuple
# we do not use the nicer sys.version_info.major
@ -113,10 +114,14 @@ def gen_cmake_command(config):
def autogenerated_notice():
start_year = 2015
year_range = str(start_year)
current_year = datetime.date.today().year
if current_year > start_year:
year_range += '-%s' % current_year
s = []
s.append('# This file is autogenerated by Autocmake http://autocmake.org')
s.append('# Copyright (c) 2015 by Radovan Bast and Jonas Juselius')
s.append('# See https://github.com/scisoft/autocmake/')
s.append('# Copyright (c) %s by Radovan Bast and Jonas Juselius' % year_range)
return '\n'.join(s)
# ------------------------------------------------------------------------------