From f365f614f09dd8e7c052f44c17b2f19ac059bf80 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Fri, 3 Aug 2018 15:27:44 +0200 Subject: [PATCH] Unify license, copyright and author information --- check.sh | 2 ++ make_dist.sh | 20 ++++++++++++++++++++ run_unittests.sh | 20 ++++++++++++++++++++ setup.py | 20 ++++++++++++++++++++ src/arnied.py | 4 ++-- src/buffers.py | 4 ++-- src/call_helpers.py | 4 ++-- src/cnfvar.py | 2 ++ src/file_helpers.py | 4 ++-- src/follow.py | 4 ++-- src/iter_helpers.py | 4 ++-- src/log_helpers.py | 4 ++-- src/log_read.py | 4 ++-- src/test_helpers.py | 4 ++-- src/text_helpers.py | 22 +++++++++++++++++++--- src/type_helpers.py | 4 ++-- src/zip_stream.py | 22 ++++++++++++++++++++-- templates/template.py | 2 ++ templates/test_template.py | 4 ++-- test/disc_filler_test.py | 4 ++-- test/test_buffer.py | 4 ++-- test/test_call_helpers.py | 4 ++-- test/test_cnfvar.py | 2 ++ test/test_file_helpers.py | 4 ++-- test/test_follow.py | 4 ++-- test/test_log_read.py | 4 ++-- test/test_test_helper.py | 4 ++-- test/test_text_helpers.py | 4 ++-- test/test_type_helpers.py | 4 ++-- 29 files changed, 147 insertions(+), 45 deletions(-) diff --git a/check.sh b/check.sh index b3fe595..6bf106b 100755 --- a/check.sh +++ b/check.sh @@ -17,6 +17,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG # check.sh # check a python file using pylint and pep8 diff --git a/make_dist.sh b/make_dist.sh index ce87167..9cbc60e 100755 --- a/make_dist.sh +++ b/make_dist.sh @@ -1,5 +1,25 @@ #!/bin/sh +# The software in this package is distributed under the GNU General +# Public License version 2 (with a special exception described below). +# +# A copy of GNU General Public License (GPL) is included in this distribution, +# in the file COPYING.GPL. +# +# As a special exception, if other files instantiate templates or use macros +# or inline functions from this file, or you compile this file and link it +# with other works to produce a work based on this file, this file +# does not by itself cause the resulting work to be covered +# by the GNU General Public License. +# +# However the source code for this file must still be made available +# in accordance with section (3) of the GNU General Public License. +# +# This exception does not invalidate any other reasons why a work based +# on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG + echo create rpm python3 setup.py bdist_rpm --packager=Intra2net --group=Intra2net --vendor="Intra2net AG" diff --git a/run_unittests.sh b/run_unittests.sh index 10d6501..5d54a24 100755 --- a/run_unittests.sh +++ b/run_unittests.sh @@ -2,4 +2,24 @@ # run unittest suite using python2 and python3 +# The software in this package is distributed under the GNU General +# Public License version 2 (with a special exception described below). +# +# A copy of GNU General Public License (GPL) is included in this distribution, +# in the file COPYING.GPL. +# +# As a special exception, if other files instantiate templates or use macros +# or inline functions from this file, or you compile this file and link it +# with other works to produce a work based on this file, this file +# does not by itself cause the resulting work to be covered +# by the GNU General Public License. +# +# However the source code for this file must still be made available +# in accordance with section (3) of the GNU General Public License. +# +# This exception does not invalidate any other reasons why a work based +# on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG + python2 -m unittest discover test && python3 -m unittest discover test diff --git a/setup.py b/setup.py index 367306c..79c2766 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,25 @@ #!/usr/bin/env python +# The software in this package is distributed under the GNU General +# Public License version 2 (with a special exception described below). +# +# A copy of GNU General Public License (GPL) is included in this distribution, +# in the file COPYING.GPL. +# +# As a special exception, if other files instantiate templates or use macros +# or inline functions from this file, or you compile this file and link it +# with other works to produce a work based on this file, this file +# does not by itself cause the resulting work to be covered +# by the GNU General Public License. +# +# However the source code for this file must still be made available +# in accordance with section (3) of the GNU General Public License. +# +# This exception does not invalidate any other reasons why a work based +# on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG + from distutils.core import setup setup(name='pyi2ncommon', diff --git a/src/arnied.py b/src/arnied.py index 38132f0..32c0f03 100644 --- a/src/arnied.py +++ b/src/arnied.py @@ -15,12 +15,12 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Interface to arnied only a stub; should at least contain a set_cnf and get_cnf - -.. codeauthor:: Intra2net """ def set_cnf(var_name, value): diff --git a/src/buffers.py b/src/buffers.py index 8e461ca..d0588d2 100644 --- a/src/buffers.py +++ b/src/buffers.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ buffers.py: buffers of various shapes, sizes and functionalities @@ -24,8 +26,6 @@ Featuring:: * CircularBuffer * LogarithmicBuffer: saves only last N items, and after that less and less so * very few old items are kept - -.. codeauthor:: Intra2net """ class CircularBuffer: diff --git a/src/call_helpers.py b/src/call_helpers.py index 1739d5f..4e945e1 100644 --- a/src/call_helpers.py +++ b/src/call_helpers.py @@ -15,14 +15,14 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Helpers for calling commands, capture their output, return result code Subprocess library just does not provide all the simplicity we would like Stay python2 compatible --> no timeouts - -.. codeauthor:: Intra2net """ from subprocess import Popen, PIPE diff --git a/src/cnfvar.py b/src/cnfvar.py index d804fd9..af95c04 100644 --- a/src/cnfvar.py +++ b/src/cnfvar.py @@ -17,6 +17,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ diff --git a/src/file_helpers.py b/src/file_helpers.py index 12449f0..65a8352 100644 --- a/src/file_helpers.py +++ b/src/file_helpers.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Helper functions and classes to deal with files and dirs and stuff @@ -45,8 +47,6 @@ What I found out on the way about filesystems: have full mount point info -> remove NOT_REAL_FILESYSTEMS_SPEC .. todo:: check what can be replaced by module psutil - -.. codeauthor:: Intra2net """ from __future__ import print_function diff --git a/src/follow.py b/src/follow.py index 167ba0f..314dcf3 100644 --- a/src/follow.py +++ b/src/follow.py @@ -17,6 +17,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ follow process output, log files and pipes using select and poll @@ -91,8 +93,6 @@ NOT possible:: len(my_follower) Follower(my_file, my_file) # (twice the same) - -.. codeauthor:: Intra2net """ from __future__ import print_function diff --git a/src/iter_helpers.py b/src/iter_helpers.py index e24b68a..f02bef7 100644 --- a/src/iter_helpers.py +++ b/src/iter_helpers.py @@ -15,13 +15,13 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Helper functions with iterators -- functional program is great! Currently, recipes from python itertools docu (:py:mod:`itertools`) that have been deemed useful - -.. codeauthor:: Intra2net """ import itertools as it diff --git a/src/log_helpers.py b/src/log_helpers.py index b3b76d5..3163971 100644 --- a/src/log_helpers.py +++ b/src/log_helpers.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Helpers for logging; featuring: @@ -37,8 +39,6 @@ Further ideas: :: .. todo:: think about how to allow different levels per handler .. todo:: do not limit logs by line numbers but by disc size? Warn when at 50%, 75%, 90%, 99% of limit? - -.. codeauthor:: Intra2net """ import logging diff --git a/src/log_read.py b/src/log_read.py index b0bb872..02bf1c2 100644 --- a/src/log_read.py +++ b/src/log_read.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Iterative reading of log files @@ -32,8 +34,6 @@ it line-wise as is normal for log files like date, time, module name, urgency and message. .. todo:: auto-detect log line layout - -.. codeauthor:: Intra2net """ import os diff --git a/src/test_helpers.py b/src/test_helpers.py index 58bef0e..4bc4b48 100644 --- a/src/test_helpers.py +++ b/src/test_helpers.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Helpers for developing quick test scripts @@ -23,8 +25,6 @@ tests .. todo:: Find out why fs not in REAL_FILESYSTEMS generate warnings so quickly even if they are still empty - -.. codeauthor:: Intra2net """ from __future__ import print_function diff --git a/src/text_helpers.py b/src/text_helpers.py index 36de9e7..987e56f 100644 --- a/src/text_helpers.py +++ b/src/text_helpers.py @@ -1,4 +1,22 @@ -#!/usr/bin/env python3 +# The software in this package is distributed under the GNU General +# Public License version 2 (with a special exception described below). +# +# A copy of GNU General Public License (GPL) is included in this distribution, +# in the file COPYING.GPL. +# +# As a special exception, if other files instantiate templates or use macros +# or inline functions from this file, or you compile this file and link it +# with other works to produce a work based on this file, this file +# does not by itself cause the resulting work to be covered +# by the GNU General Public License. +# +# However the source code for this file must still be made available +# in accordance with section (3) of the GNU General Public License. +# +# This exception does not invalidate any other reasons why a work based +# on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Functions for printing colored text using ANSI escape sequences @@ -15,8 +33,6 @@ end-of-color or end-of-style escape sequences instead of 0 (reset-everything). References: * http://stackoverflow.com/questions/287871/print-in-terminal-with-colors-using-python * https://en.wikipedia.org/wiki/ANSI_escape_code - -.. codeauthor:: Intra2net AG """ from __future__ import print_function diff --git a/src/type_helpers.py b/src/type_helpers.py index ae4e0ce..123f5a4 100644 --- a/src/type_helpers.py +++ b/src/type_helpers.py @@ -15,13 +15,13 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Helpers for type checking and conversion, like isstr(x), is_file_obj(x) Provides abstraction from difference between PY2 and PY3 - -.. codeauthor:: Intra2net """ from __future__ import print_function diff --git a/src/zip_stream.py b/src/zip_stream.py index b5032e2..6952e2f 100644 --- a/src/zip_stream.py +++ b/src/zip_stream.py @@ -1,3 +1,23 @@ +# The software in this package is distributed under the GNU General +# Public License version 2 (with a special exception described below). +# +# A copy of GNU General Public License (GPL) is included in this distribution, +# in the file COPYING.GPL. +# +# As a special exception, if other files instantiate templates or use macros +# or inline functions from this file, or you compile this file and link it +# with other works to produce a work based on this file, this file +# does not by itself cause the resulting work to be covered +# by the GNU General Public License. +# +# However the source code for this file must still be made available +# in accordance with section (3) of the GNU General Public License. +# +# This exception does not invalidate any other reasons why a work based +# on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG + """ Streamable version of zipfile Python's :py:class:`zipfile.ZipFile` can only write to seekable streams @@ -12,8 +32,6 @@ Use as follows:: info = zip.create_zipinfo(big_file) with open(big_file, 'rb') as input_stream: zip.write_stream(input_stream, info) - -.. codeauthor:: Intra2net AG """ import sys diff --git a/templates/template.py b/templates/template.py index 0e01357..c139b7d 100644 --- a/templates/template.py +++ b/templates/template.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Module name: Summary of this module diff --git a/templates/test_template.py b/templates/test_template.py index fb85c91..cf9bb63 100644 --- a/templates/test_template.py +++ b/templates/test_template.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ test_module_name.py: unit tests for module_name @@ -23,8 +25,6 @@ Tests classes and functions in module_name Should be able run from python2 and python3! For help see :py:mod:`unittest` - -.. codeauthor:: Intra2net """ from __future__ import print_function diff --git a/test/disc_filler_test.py b/test/disc_filler_test.py index 74f012f..11783e9 100755 --- a/test/disc_filler_test.py +++ b/test/disc_filler_test.py @@ -17,14 +17,14 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Test test_helpers.DiscFillChecker by actually writing lots of data to disc Indulge in the luxury of assuming we have python3 here ;-) *NOT* a unittest (unittest discover only finds tests in files test_*.py). - -.. codeauthor:: Intra2net """ from sys import stderr, argv as cmd_line_args diff --git a/test/test_buffer.py b/test/test_buffer.py index 0f58129..82a8ad6 100644 --- a/test/test_buffer.py +++ b/test/test_buffer.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ buffer_unittest.py: unit tests for buffers.py @@ -23,8 +25,6 @@ Tests classes and functions in buffers.py Should be able run from python2 and python3! For help see :py:mod:`unittest` - -.. codeauthor:: Intra2net """ from __future__ import absolute_import diff --git a/test/test_call_helpers.py b/test/test_call_helpers.py index 225755f..83924db 100644 --- a/test/test_call_helpers.py +++ b/test/test_call_helpers.py @@ -15,12 +15,12 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ call_helper_unittest.py: unit tests for call_helpers Should be run from python2 and python3! - -.. codeauthor:: Intra2net """ from __future__ import absolute_import diff --git a/test/test_cnfvar.py b/test/test_cnfvar.py index a242691..408a051 100755 --- a/test/test_cnfvar.py +++ b/test/test_cnfvar.py @@ -18,6 +18,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG import unittest from src import cnfvar diff --git a/test/test_file_helpers.py b/test/test_file_helpers.py index adf6ebd..e25ea4e 100644 --- a/test/test_file_helpers.py +++ b/test/test_file_helpers.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ file_helper_unittest.py: unit tests for file_helpers @@ -23,8 +25,6 @@ Tests classes and functions in file_helpers Should be able to run from python2 and python3! For help see :py:mod:`unittest` - -.. codeauthor:: Intra2net """ from __future__ import absolute_import diff --git a/test/test_follow.py b/test/test_follow.py index cadb616..bcbd168 100644 --- a/test/test_follow.py +++ b/test/test_follow.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Unittest for follow.py @@ -25,8 +27,6 @@ thread that writes to file/socket/stdout .. warn:: DEPRECATED (at least for files see log_read; may still be useful for pipes/sockets) - -.. codeauthor:: Intra2net """ from __future__ import absolute_import diff --git a/test/test_log_read.py b/test/test_log_read.py index c36de76..6dab9d2 100644 --- a/test/test_log_read.py +++ b/test/test_log_read.py @@ -15,12 +15,12 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ Unittests for log_read Creates own thread to write data to a log file - -.. codeauthor:: Intra2net """ from __future__ import absolute_import diff --git a/test/test_test_helper.py b/test/test_test_helper.py index 9d5f7ab..38fa26b 100644 --- a/test/test_test_helper.py +++ b/test/test_test_helper.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ test_helper_unittest.py: unit tests for test_helpers @@ -23,8 +25,6 @@ Tests classes and functions in test_helpers Should be able run from python2 and python3! For help see :py:mod:`unittest` - -.. codeauthor:: Intra2net """ # TODO: remove print, use logging instead diff --git a/test/test_text_helpers.py b/test/test_text_helpers.py index 5bf81e3..ef03c7c 100644 --- a/test/test_text_helpers.py +++ b/test/test_text_helpers.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ test_text_helpers.py: unit tests for text_helpers @@ -23,8 +25,6 @@ Tests classes and functions in text_helpers Should be able run from python2 and python3! For help see :py:mod:`unittest` - -.. codeauthor:: Intra2net """ from __future__ import absolute_import diff --git a/test/test_type_helpers.py b/test/test_type_helpers.py index 97785dd..731a3ab 100644 --- a/test/test_type_helpers.py +++ b/test/test_type_helpers.py @@ -15,6 +15,8 @@ # # This exception does not invalidate any other reasons why a work based # on this file might be covered by the GNU General Public License. +# +# Copyright (c) 2016-2018 Intra2net AG """ type_helper_unittest.py: unit tests for type_helpers @@ -23,8 +25,6 @@ Tests classes and functions in type_helpers Should be run from python2 and python3! For help see :py:mod:`unittest` - -.. codeauthor:: Intra2net """ from __future__ import absolute_import -- 1.7.1