[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/10: gr-utils: modtool: add option --copy
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/10: gr-utils: modtool: add option --copyright to add function to automatically fillout name in LICENSE file. |
Date: |
Sun, 21 Feb 2016 15:39:13 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit e63f105c965989078188a22d737c10bfddd8e264
Author: Andrej Rode <address@hidden>
Date: Wed Feb 10 22:48:54 2016 +0100
gr-utils: modtool: add option --copyright to add function to automatically
fillout name in LICENSE file.
---
gr-utils/python/modtool/modtool_add.py | 11 ++++++++---
gr-utils/python/modtool/templates.py | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/gr-utils/python/modtool/modtool_add.py
b/gr-utils/python/modtool/modtool_add.py
index a4812c8..f04d9d9 100644
--- a/gr-utils/python/modtool/modtool_add.py
+++ b/gr-utils/python/modtool/modtool_add.py
@@ -53,6 +53,8 @@ class ModToolAdd(ModTool):
choices=self._block_types, default=None, help="One of %s." %
', '.join(self._block_types))
ogroup.add_option("--license-file", type="string", default=None,
help="File containing the license header for every source code
file.")
+ ogroup.add_option("--copyright", type="string", default=None,
+ help="Name of the copyright holder (you or your company) MUST
be a quoted string.")
ogroup.add_option("--argument-list", type="string", default=None,
help="The argument list for the constructor and make
functions.")
ogroup.add_option("--add-python-qa", action="store_true", default=None,
@@ -77,7 +79,6 @@ class ModToolAdd(ModTool):
self._info['blocktype'] = raw_input("Enter block type: ")
if self._info['blocktype'] not in self._block_types:
print 'Must be one of ' + str(self._block_types)
-
# Allow user to specify language interactively if not set
self._info['lang'] = options.lang
if self._info['lang'] is None:
@@ -102,8 +103,12 @@ class ModToolAdd(ModTool):
raise ModToolException('Invalid block name.')
print "Block/code identifier: " + self._info['blockname']
self._info['fullblockname'] = self._info['modname'] + '_' +
self._info['blockname']
+ self._info['copyrightholder'] = options.copyright
+ if self._info['copyrightholder'] is None:
+ self._info['copyrightholder'] = '<+YOU OR YOUR COMPANY+>'
+ elif self._info['is_component']:
+ print "For GNUradio components the FSF is added as copyright
holder"
self._info['license'] = self.setup_choose_license()
-
if options.argument_list is not None:
self._info['arglist'] = options.argument_list
else:
@@ -140,7 +145,7 @@ class ModToolAdd(ModTool):
elif self._info['is_component']:
return Templates['grlicense']
else:
- return Templates['defaultlicense']
+ return get_template('defaultlicense', **self._info)
def _write_tpl(self, tpl, path, fname):
""" Shorthand for writing a substituted template to a file"""
diff --git a/gr-utils/python/modtool/templates.py
b/gr-utils/python/modtool/templates.py
index dc840df..9caf658 100644
--- a/gr-utils/python/modtool/templates.py
+++ b/gr-utils/python/modtool/templates.py
@@ -26,7 +26,7 @@ Templates = {}
# Default licence
Templates['defaultlicense'] = '''
-Copyright %d <+YOU OR YOUR COMPANY+>.
+Copyright %d ${copyrightholder}.
This is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- [Commit-gnuradio] [gnuradio] branch master updated (64f3b70 -> 762a089), git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 03/10: gr_modtool: add test on license_file for option --copyright. fix typo, git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 10/10: Merge remote-tracking branch 'michaelld/fix_version_info', git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 06/10: cmake: when not release and no GIT_EXECUTABLE nad not .git directory in the archive, allow external overriding of version info via GR_GIT_COUNT and GR_GIT_HASH, similar to what UHD allows., git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 05/10: qtgui: fix grc defs for axislabels patch, git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 09/10: Merge remote-tracking branch 'noc0lour/gr_modtool-name_option', git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 07/10: Merge branch 'maint', git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 08/10: Merge remote-tracking branch 'osh/qtgui_axislabels_onoff', git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 02/10: gr-utils: modtool: add option --copyright to add function to automatically fillout name in LICENSE file.,
git <=
- [Commit-gnuradio] [gnuradio] 01/10: qtgui: allow axis labels on/off modes, git, 2016/02/21
- [Commit-gnuradio] [gnuradio] 04/10: qtgui: add axis labels to raster, constellation, histogram. Fix waterfall axis issue, git, 2016/02/21