From cdf5b0bce44c58b601f6bfb1a3b8009fb720643c Mon Sep 17 00:00:00 2001 From: Nikolaus Demmel Date: Sat, 19 Jul 2014 02:20:10 +0200 Subject: [PATCH 1/6] Move util scripts to subfolder. --- check-docstrings.sh => maintenance_utils/check-docstrings.sh | 0 compact_rules.sh => maintenance_utils/compact_rules.sh | 0 python-modernize.sh => maintenance_utils/python-modernize.sh | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename check-docstrings.sh => maintenance_utils/check-docstrings.sh (100%) rename compact_rules.sh => maintenance_utils/compact_rules.sh (100%) rename python-modernize.sh => maintenance_utils/python-modernize.sh (100%) diff --git a/check-docstrings.sh b/maintenance_utils/check-docstrings.sh similarity index 100% rename from check-docstrings.sh rename to maintenance_utils/check-docstrings.sh diff --git a/compact_rules.sh b/maintenance_utils/compact_rules.sh similarity index 100% rename from compact_rules.sh rename to maintenance_utils/compact_rules.sh diff --git a/python-modernize.sh b/maintenance_utils/python-modernize.sh similarity index 100% rename from python-modernize.sh rename to maintenance_utils/python-modernize.sh From c9147b35dc828fd5310db2145ccdc132383a4916 Mon Sep 17 00:00:00 2001 From: Nikolaus Demmel Date: Sat, 19 Jul 2014 16:51:20 +0200 Subject: [PATCH 2/6] Add comments to maintenace utils. --- maintenance_utils/compact_rules.sh | 2 ++ maintenance_utils/python-modernize.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/maintenance_utils/compact_rules.sh b/maintenance_utils/compact_rules.sh index bbd7a52..7030d6c 100644 --- a/maintenance_utils/compact_rules.sh +++ b/maintenance_utils/compact_rules.sh @@ -1 +1,3 @@ +# Run this in a sibling to a checkout of the rosdistro repository to +# load all rules files and write back in compact canonical form. find ../rosdistro/rosdep -name *.yaml -exec xylem _compact_rules_file {} -w \; diff --git a/maintenance_utils/python-modernize.sh b/maintenance_utils/python-modernize.sh index 1cafe7b..4bd63a7 100755 --- a/maintenance_utils/python-modernize.sh +++ b/maintenance_utils/python-modernize.sh @@ -2,4 +2,6 @@ # Install development version from this fork: # https://github.com/takluyver/python-modernize # Seems to be more maintained +# Run in root of xylem repository to update python files in such a way +# as to make maintaining portable py2/py3 code easier. python-modernize xylem test --future-unicode From fc596312721ca1c796ec89b69e38e72e5388fffa Mon Sep 17 00:00:00 2001 From: Nikolaus Demmel Date: Sat, 19 Jul 2014 16:52:22 +0200 Subject: [PATCH 3/6] Update license to Apache 2 and include tool to update license headers in source files. --- LICENSE.txt | 234 +++++++++++++++--- maintenance_utils/licenseheader.txt | 13 + .../old_apache_licenseheader.regex | 13 + maintenance_utils/old_bsd_licenseheader.regex | 32 +++ maintenance_utils/update_license_headers.py | 159 ++++++++++++ maintenance_utils/update_license_headers.sh | 15 ++ 6 files changed, 434 insertions(+), 32 deletions(-) create mode 100644 maintenance_utils/licenseheader.txt create mode 100644 maintenance_utils/old_apache_licenseheader.regex create mode 100644 maintenance_utils/old_bsd_licenseheader.regex create mode 100755 maintenance_utils/update_license_headers.py create mode 100755 maintenance_utils/update_license_headers.sh diff --git a/LICENSE.txt b/LICENSE.txt index c82e3ea..89c50c4 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,32 +1,202 @@ -Software License Agreement (BSD License) - -Copyright (c) 2013 - 2014, Open Source Robotics Foundation, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -* Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following -disclaimer in the documentation and/or other materials provided -with the distribution. -* Neither the name of Open Source Robotics Foundation, Inc. nor -the names of its contributors may be used to endorse or promote -products derived from this software without specific prior -written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/maintenance_utils/licenseheader.txt b/maintenance_utils/licenseheader.txt new file mode 100644 index 0000000..0bc0e5f --- /dev/null +++ b/maintenance_utils/licenseheader.txt @@ -0,0 +1,13 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/maintenance_utils/old_apache_licenseheader.regex b/maintenance_utils/old_apache_licenseheader.regex new file mode 100644 index 0000000..d74621f --- /dev/null +++ b/maintenance_utils/old_apache_licenseheader.regex @@ -0,0 +1,13 @@ +# Copyright .* +# +# Licensed under the Apache License, Version 2.0 \(the "License"\); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/maintenance_utils/old_bsd_licenseheader.regex b/maintenance_utils/old_bsd_licenseheader.regex new file mode 100644 index 0000000..eb95960 --- /dev/null +++ b/maintenance_utils/old_bsd_licenseheader.regex @@ -0,0 +1,32 @@ +# Software License Agreement \(BSD License\) +# +# Copyright \(c\) .* +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# \* Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# \* Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# \* Neither the name of Open Source Robotics Foundation, Inc. nor +# the names of its contributors may be used to endorse or promote +# products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \(INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION\) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT \(INCLUDING NEGLIGENCE OR OTHERWISE\) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. diff --git a/maintenance_utils/update_license_headers.py b/maintenance_utils/update_license_headers.py new file mode 100755 index 0000000..6d80e70 --- /dev/null +++ b/maintenance_utils/update_license_headers.py @@ -0,0 +1,159 @@ +#!/usr/bin/env python + +# Run in root of xylem directory to add / update the license header in +# all python files + +import argparse +import os +import re +import fnmatch + + +def read_file(filename): + with open(filename, 'rb') as f: + data = f.read() + return data.decode('utf-8') + + +def write_file(filename, content): + data = content.encode("utf-8") + with open(filename, 'wb') as f: + f.write(data) + + +def process_args(args): + + args.license_header = read_file(args.license_header) + + args.old_header = re.compile("|".join(map(read_file, args.old_header) + [re.escape(args.license_header)]), re.MULTILINE) + args.except_dirs = re.compile("|".join(map(fnmatch.translate, args.except_dirs))) + args.matching = re.compile("|".join(map(fnmatch.translate, args.matching))) + args.except_matching = re.compile("|".join(map(fnmatch.translate, args.except_matching))) + args.except_content = re.compile("|".join(args.except_content), re.MULTILINE) + + +def replace_headers(args): + + for path in args.path: + replace_headers_recursive(path, args) + + +def replace_headers_recursive(path, args): + if os.path.islink(path): + if args.verbose: + print("%s -- ignoring symbolic link" % path) + elif os.path.isfile(path): + filename = os.path.basename(path) + if args.matching.match(filename): + if not args.except_matching.match(filename): + replace_headers_file(path, args) + else: + if args.verbose: + print("%s -- ignoring excluded filename" % path) + else: + if args.verbose: + print("%s -- ignoring not included filename" % path) + elif os.path.isdir(path): + if args.except_dirs.match(path): + if args.verbose: + print("%s -- ignoring excluded directory" % path) + else: + if args.verbose: + print("%s -- descending into directory" % path) + for p in os.listdir(path): + replace_headers_recursive(os.path.join(path, p), args) + else: + if args.verbose: + print("%s -- ignoring unknown directory entry" % path) + + +def replace_headers_file(path, args): + content = read_file(path) + if args.except_content.search(content): + if args.verbose: + print("%s -- ignoring file excluded content" % path) + else: + match = args.old_header.search(content) + if match: + if content[match.start():match.end()] == args.license_header: + print("%s -- up to date" % path) + else: + print("%s -- replacing old header" % path) + content = content[:match.start()] + args.license_header + content[match.end():] + if not args.simulate: + write_file(path, content) + else: + lines = content.splitlines(True) + if lines[0].startswith("#!"): + print("%s -- inserting new header after shebang" % path) + insert_header(lines, 1, args.license_header) + elif lines[0].startswith("# -*-"): + print("%s -- inserting new header after special first comment line" % path) + insert_header(lines, 1, args.license_header) + else: + print("%s -- inserting new header at the beginning of file" % path) + insert_header(lines, 0, args.license_header) + if not args.simulate: + write_file(path, "".join(lines)) + + +def insert_header(lines, index, header): + if len(lines) > index: + if not lines[index].isspace(): + lines.insert(index, "\n") + lines.insert(index, header) + if index > 0: + if not lines[index-1].isspace(): + lines.insert(index, "\n") + + +def main(): + + parser = argparse.ArgumentParser( + description="Update the license header in source files.") + + add = parser.add_argument + + add("path", nargs="+", + help="Paths to search for source files in.") + add("--license-header", "-l", required=True, + help="License header file. The exact content of this file will be \ +inserted as a license header (if not present already).") + add("--old-header", "-o", action="append", + help="File containing a multiline python regular expression to \ +look for existing license headers in source files. May be passed multiple \ +times. If any of the regular expressions match, the matched text is replaced \ +with the new header.") + add("--except-dirs", action="append", + help="Glob pattern matching directories which to ignore. May be \ +passed multiple times.") + add("--matching", action="append", + help="Glob pattern matching files for which to replace headers. \ +May be passed multiple times.") + add("--except-matching", action="append", + help="Glob pattern matching files which to ignore. Takes precedence \ +over '--matching'. May be passed multiple times.") + add("--except-content", action="append", + help="Multiline regular expression matching file content. If it \ +matches, file is ignored. May be passed multiple times.") + add("--simulate", "-s", action="store_true", + help="If passed, no files are written.") + add("--verbose", "-v", action="store_true", + help="If passed, verbose output on ignored files and folders.") + + args = parser.parse_args() + + if not args.matching: + matching = ["*"] + + if args.verbose: + print("Arguments:") + print(args) + + process_args(args) + + replace_headers(args) + + +if __name__ == "__main__": + main() diff --git a/maintenance_utils/update_license_headers.sh b/maintenance_utils/update_license_headers.sh new file mode 100755 index 0000000..4bede07 --- /dev/null +++ b/maintenance_utils/update_license_headers.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# Run in root of xylem repository + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +python "$DIR/update_license_headers.py" \ + xylem test \ + --license-header "$DIR/licenseheader.txt" \ + --old-header "$DIR/old_apache_licenseheader.regex" \ + --old-header "$DIR/old_bsd_licenseheader.regex" \ + --except-dirs ".*" \ + --matching "*.py" \ + --except-matching "setup.py" \ + --except-content "\A\Z" \ + $@ From 8f6d230b5a3d1fc8f484718252881134eb259b78 Mon Sep 17 00:00:00 2001 From: Nikolaus Demmel Date: Sat, 19 Jul 2014 16:54:45 +0200 Subject: [PATCH 4/6] Use script to include/update license headers in all python files. --- test/__init__.py | 14 +++++++ test/test_code_format.py | 14 +++++++ .../installers/test_installer_context.py | 14 +++++++ test/unit_tests/os_support/test_os.py | 14 +++++++ test/unit_tests/specs/test_merge_rules.py | 14 +++++++ test/unit_tests/specs/test_rules.py | 14 +++++++ test/unit_tests/specs/test_verify_rules.py | 14 +++++++ test/utils/common.py | 14 +++++++ xylem/__init__.py | 39 +++++------------- xylem/commands/_compact_rules_file.py | 39 +++++------------- xylem/commands/lookup.py | 39 +++++------------- xylem/commands/main.py | 40 +++++-------------- xylem/commands/resolve.py | 39 +++++------------- xylem/commands/update.py | 39 +++++------------- xylem/exception.py | 14 +++++++ xylem/installers/__init__.py | 14 +++++++ xylem/installers/impl.py | 13 ++++++ xylem/installers/package_manager_installer.py | 14 +++++++ xylem/installers/plugins/fake.py | 14 +++++++ xylem/installers/plugins/homebrew.py | 14 +++++++ xylem/installers/plugins/macports.py | 14 +++++++ xylem/installers/plugins/pip.py | 14 +++++++ xylem/load_url.py | 13 ++++++ xylem/log_utils.py | 39 +++++------------- xylem/lookup.py | 13 ++++++ xylem/os_support/__init__.py | 14 +++++++ xylem/os_support/impl.py | 13 ++++++ xylem/os_support/os_detect.py | 14 +++++++ xylem/os_support/plugins.py | 14 +++++++ xylem/plugin_utils.py | 14 +++++++ xylem/resolve.py | 13 ++++++ xylem/sources/__init__.py | 14 +++++++ xylem/sources/database.py | 13 ++++++ xylem/sources/impl.py | 39 +++++------------- xylem/specs/__init__.py | 14 +++++++ xylem/specs/impl.py | 39 +++++------------- xylem/specs/plugins/rules.py | 39 +++++------------- xylem/specs/rules_dict.py | 14 +++++++ xylem/terminal_color.py | 39 +++++------------- xylem/text_utils.py | 14 +++++++ xylem/update.py | 39 +++++------------- xylem/util.py | 39 +++++------------- 42 files changed, 530 insertions(+), 378 deletions(-) diff --git a/test/__init__.py b/test/__init__.py index b9760e5..4935aa0 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Add the scripts folder to the path from __future__ import unicode_literals diff --git a/test/test_code_format.py b/test/test_code_format.py index 1e7eee0..064d4da 100644 --- a/test/test_code_format.py +++ b/test/test_code_format.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from __future__ import unicode_literals import flake8.engine import os diff --git a/test/unit_tests/installers/test_installer_context.py b/test/unit_tests/installers/test_installer_context.py index 227cced..8dac52e 100644 --- a/test/unit_tests/installers/test_installer_context.py +++ b/test/unit_tests/installers/test_installer_context.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from __future__ import print_function from __future__ import unicode_literals from xylem.installers import InstallerContext diff --git a/test/unit_tests/os_support/test_os.py b/test/unit_tests/os_support/test_os.py index 6e163bc..c2da84c 100644 --- a/test/unit_tests/os_support/test_os.py +++ b/test/unit_tests/os_support/test_os.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from __future__ import print_function from __future__ import unicode_literals diff --git a/test/unit_tests/specs/test_merge_rules.py b/test/unit_tests/specs/test_merge_rules.py index 0c2dab3..a59a5e2 100644 --- a/test/unit_tests/specs/test_merge_rules.py +++ b/test/unit_tests/specs/test_merge_rules.py @@ -1,5 +1,19 @@ # -*- coding: utf-8 -*- +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Unit tests for rules dict merging.""" from __future__ import unicode_literals diff --git a/test/unit_tests/specs/test_rules.py b/test/unit_tests/specs/test_rules.py index 4bf8748..7929d1e 100644 --- a/test/unit_tests/specs/test_rules.py +++ b/test/unit_tests/specs/test_rules.py @@ -1,5 +1,19 @@ # -*- coding: utf-8 -*- +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from __future__ import unicode_literals from pprint import pprint diff --git a/test/unit_tests/specs/test_verify_rules.py b/test/unit_tests/specs/test_verify_rules.py index d4fc879..7deb9ef 100644 --- a/test/unit_tests/specs/test_verify_rules.py +++ b/test/unit_tests/specs/test_verify_rules.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Unit tests for structural verification functions for rules dicts.""" from __future__ import unicode_literals diff --git a/test/utils/common.py b/test/utils/common.py index b81148b..3f6cd49 100644 --- a/test/utils/common.py +++ b/test/utils/common.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Common tools for running tests """ diff --git a/xylem/__init__.py b/xylem/__init__.py index 8feceb3..bc3e770 100644 --- a/xylem/__init__.py +++ b/xylem/__init__.py @@ -1,35 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals diff --git a/xylem/commands/_compact_rules_file.py b/xylem/commands/_compact_rules_file.py index 3762218..3c840a1 100644 --- a/xylem/commands/_compact_rules_file.py +++ b/xylem/commands/_compact_rules_file.py @@ -1,35 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals diff --git a/xylem/commands/lookup.py b/xylem/commands/lookup.py index 518ad86..ac7ff50 100644 --- a/xylem/commands/lookup.py +++ b/xylem/commands/lookup.py @@ -1,35 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals diff --git a/xylem/commands/main.py b/xylem/commands/main.py index 1a44be6..5a2bf84 100644 --- a/xylem/commands/main.py +++ b/xylem/commands/main.py @@ -1,36 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals diff --git a/xylem/commands/resolve.py b/xylem/commands/resolve.py index 4ff3555..fc703c0 100644 --- a/xylem/commands/resolve.py +++ b/xylem/commands/resolve.py @@ -1,35 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals diff --git a/xylem/commands/update.py b/xylem/commands/update.py index 1026a6d..266b367 100644 --- a/xylem/commands/update.py +++ b/xylem/commands/update.py @@ -1,35 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals diff --git a/xylem/exception.py b/xylem/exception.py index bfd5305..eaf167b 100644 --- a/xylem/exception.py +++ b/xylem/exception.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Exception classes for error handling xylem.""" diff --git a/xylem/installers/__init__.py b/xylem/installers/__init__.py index b4ce114..ffc0d73 100644 --- a/xylem/installers/__init__.py +++ b/xylem/installers/__init__.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from __future__ import unicode_literals from .impl import InstallerContext, Installer diff --git a/xylem/installers/impl.py b/xylem/installers/impl.py index 10f878a..e7f9af3 100644 --- a/xylem/installers/impl.py +++ b/xylem/installers/impl.py @@ -1,3 +1,16 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals diff --git a/xylem/installers/package_manager_installer.py b/xylem/installers/package_manager_installer.py index a4f798e..28510ee 100644 --- a/xylem/installers/package_manager_installer.py +++ b/xylem/installers/package_manager_installer.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from __future__ import unicode_literals from . import Installer diff --git a/xylem/installers/plugins/fake.py b/xylem/installers/plugins/fake.py index 0934c2b..0466f6f 100644 --- a/xylem/installers/plugins/fake.py +++ b/xylem/installers/plugins/fake.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ %s diff --git a/xylem/installers/plugins/homebrew.py b/xylem/installers/plugins/homebrew.py index 96685b5..789fa08 100644 --- a/xylem/installers/plugins/homebrew.py +++ b/xylem/installers/plugins/homebrew.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ %s diff --git a/xylem/installers/plugins/macports.py b/xylem/installers/plugins/macports.py index 989e0ba..261b670 100644 --- a/xylem/installers/plugins/macports.py +++ b/xylem/installers/plugins/macports.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ %s diff --git a/xylem/installers/plugins/pip.py b/xylem/installers/plugins/pip.py index 20efb3f..5c6bbbb 100644 --- a/xylem/installers/plugins/pip.py +++ b/xylem/installers/plugins/pip.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ %s diff --git a/xylem/load_url.py b/xylem/load_url.py index 9b89d16..a7da5a8 100644 --- a/xylem/load_url.py +++ b/xylem/load_url.py @@ -1,3 +1,16 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Helper to download content from url.""" diff --git a/xylem/log_utils.py b/xylem/log_utils.py index 2a60faa..5ce0bfe 100644 --- a/xylem/log_utils.py +++ b/xylem/log_utils.py @@ -1,35 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import print_function from __future__ import unicode_literals diff --git a/xylem/lookup.py b/xylem/lookup.py index 81db992..6da0fe7 100644 --- a/xylem/lookup.py +++ b/xylem/lookup.py @@ -1,3 +1,16 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals diff --git a/xylem/os_support/__init__.py b/xylem/os_support/__init__.py index 7f49529..4765902 100644 --- a/xylem/os_support/__init__.py +++ b/xylem/os_support/__init__.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Module to manage OS plugins and their use for OS detection.""" from __future__ import unicode_literals diff --git a/xylem/os_support/impl.py b/xylem/os_support/impl.py index 8a436b2..667dfef 100644 --- a/xylem/os_support/impl.py +++ b/xylem/os_support/impl.py @@ -1,3 +1,16 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals diff --git a/xylem/os_support/os_detect.py b/xylem/os_support/os_detect.py index d3e8282..a28e07e 100644 --- a/xylem/os_support/os_detect.py +++ b/xylem/os_support/os_detect.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Library for detecting the current OS, including detecting specific Linux distributions. diff --git a/xylem/os_support/plugins.py b/xylem/os_support/plugins.py index 57a4ccd..96f2550 100644 --- a/xylem/os_support/plugins.py +++ b/xylem/os_support/plugins.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from __future__ import unicode_literals from .impl import OS from .os_detect import OS_DEBIAN, OS_OSX, OS_UBUNTU, OsDetect diff --git a/xylem/plugin_utils.py b/xylem/plugin_utils.py index ecede52..5c2358d 100644 --- a/xylem/plugin_utils.py +++ b/xylem/plugin_utils.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Helpers for loading plugin definitions.""" from __future__ import unicode_literals diff --git a/xylem/resolve.py b/xylem/resolve.py index a25774b..30257d8 100644 --- a/xylem/resolve.py +++ b/xylem/resolve.py @@ -1,3 +1,16 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals diff --git a/xylem/sources/__init__.py b/xylem/sources/__init__.py index 730d28e..20c50a2 100644 --- a/xylem/sources/__init__.py +++ b/xylem/sources/__init__.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from __future__ import unicode_literals from .impl import SourcesContext diff --git a/xylem/sources/database.py b/xylem/sources/database.py index 2d3f1cc..5580c85 100644 --- a/xylem/sources/database.py +++ b/xylem/sources/database.py @@ -1,3 +1,16 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals from __future__ import print_function diff --git a/xylem/sources/impl.py b/xylem/sources/impl.py index f744c0c..a57401b 100644 --- a/xylem/sources/impl.py +++ b/xylem/sources/impl.py @@ -1,35 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013 - 2014, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals diff --git a/xylem/specs/__init__.py b/xylem/specs/__init__.py index d937a3f..192479f 100644 --- a/xylem/specs/__init__.py +++ b/xylem/specs/__init__.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from __future__ import unicode_literals from .impl import verify_spec_name diff --git a/xylem/specs/impl.py b/xylem/specs/impl.py index 01a7aff..e9ddb9f 100644 --- a/xylem/specs/impl.py +++ b/xylem/specs/impl.py @@ -1,35 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import unicode_literals diff --git a/xylem/specs/plugins/rules.py b/xylem/specs/plugins/rules.py index cd8e75c..56df202 100644 --- a/xylem/specs/plugins/rules.py +++ b/xylem/specs/plugins/rules.py @@ -1,35 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """This module implements parsing and validating of rules spec files. diff --git a/xylem/specs/rules_dict.py b/xylem/specs/rules_dict.py index a4c403a..b50d288 100644 --- a/xylem/specs/rules_dict.py +++ b/xylem/specs/rules_dict.py @@ -1,5 +1,19 @@ # -*- coding: utf-8 -*- +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # TODO: Add module docstring, explaining the structure of (expanded) # rules dicts, including terminology (rules dict, os dict, version dict, # installer dict, installer rule), keywords (any_os, any_version, diff --git a/xylem/terminal_color.py b/xylem/terminal_color.py index 71dc4b0..c883ba2 100644 --- a/xylem/terminal_color.py +++ b/xylem/terminal_color.py @@ -1,35 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Module to enable color terminal output.""" diff --git a/xylem/text_utils.py b/xylem/text_utils.py index c86b257..3952be9 100644 --- a/xylem/text_utils.py +++ b/xylem/text_utils.py @@ -1,3 +1,17 @@ +# Copyright 2014 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Utility module for dealing with unicode/str/bytes in a uniform way. This has been inspired by parts of the ``kitchen`` package, which is not diff --git a/xylem/update.py b/xylem/update.py index 8f9a740..876d5e7 100644 --- a/xylem/update.py +++ b/xylem/update.py @@ -1,35 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # TODO: update docstrings diff --git a/xylem/util.py b/xylem/util.py index 20796d2..465191f 100644 --- a/xylem/util.py +++ b/xylem/util.py @@ -1,35 +1,16 @@ -# Software License Agreement (BSD License) +# Copyright 2014 Open Source Robotics Foundation, Inc. # -# Copyright (c) 2013, Open Source Robotics Foundation, Inc. -# All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# http://www.apache.org/licenses/LICENSE-2.0 # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Open Source Robotics Foundation, Inc. nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Provides common utility functions for xylem.""" From 319cf8ba0c398dbc8ab277b3ff5a3aef79ea74d5 Mon Sep 17 00:00:00 2001 From: Nikolaus Demmel Date: Sat, 19 Jul 2014 22:10:48 +0200 Subject: [PATCH 5/6] Update license in setup.py --- setup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index c91cec8..5d277d2 100755 --- a/setup.py +++ b/setup.py @@ -2,6 +2,12 @@ from setuptools import setup, find_packages +# TODO: read README and LICENSE files to compose "long description" +# +# This might be useful: +# http://stackoverflow.com/questions/1192632/how-to-convert-restructuredtext-to-plain-text +# http://www.jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-project-the-right-way/ + # see: http://reinout.vanrees.org/weblog/2009/12/17/managing-dependencies.html tests_require = ['nose', 'flake8', 'mock', 'coverage'] @@ -32,7 +38,7 @@ 'Development Status :: 2 - Pre-Alpha' 'Environment :: Console', 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', + 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', @@ -49,7 +55,7 @@ ], description="xylem is a package manager abstraction tool.", long_description="xylem is a package manager abstraction tool.", - license='BSD', + license='Apache License 2.0', test_suite='test', entry_points={ 'console_scripts': [ From 4be6cd96408823c55f09696f55b4530dc9995767 Mon Sep 17 00:00:00 2001 From: Nikolaus Demmel Date: Mon, 21 Jul 2014 14:37:19 +0200 Subject: [PATCH 6/6] Fix LICENSE.txt --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index 89c50c4..2b8df04 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -186,7 +186,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright 2014 Open Source Robotics Foundation, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.