From ac9d62961476ba500a56bf8d4fc6d448824aff61 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 3 Jan 2017 11:03:00 +0100 Subject: [PATCH 1/3] NOTICE: Add blank lines around the address To make it more stand out and align with the acknowledgment formatting. --- NOTICE | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NOTICE b/NOTICE index b56868206d2..6b400096423 100644 --- a/NOTICE +++ b/NOTICE @@ -40,8 +40,10 @@ or https://github.com/nexB/scancode-thirdparty-src/ You may also contact us to request the source code by email at info@nexb.com or by postal mail at: + nexB Inc., ScanCode open source code request 735 Industrial Road, Suite #101, 94070 San Carlos, CA, USA + Please indicate in your communication the ScanCode version for which you are requesting source code. From c482a456f01556ee52e8828655b69d8ecb165148 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 3 Jan 2017 11:15:32 +0100 Subject: [PATCH 2/3] NOTICE: Update the Copyright year --- NOTICE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NOTICE b/NOTICE index 6b400096423..e7eb6d39566 100644 --- a/NOTICE +++ b/NOTICE @@ -1,7 +1,7 @@ Software license ================ -Copyright (c) 2015 nexB Inc. and others. All rights reserved. +Copyright (c) 2017 nexB Inc. and others. All rights reserved. http://nexb.com and https://github.com/nexB/scancode-toolkit/ The ScanCode software is licensed under the Apache License version 2.0. Data generated with ScanCode require an acknowledgment. From ed1925a91942857d8aa8491232a45891adbc17f6 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 3 Jan 2017 11:30:16 +0100 Subject: [PATCH 3/3] Load notice text from NOTICE file --- src/scancode/cli.py | 70 ++++++--------------------------------------- 1 file changed, 9 insertions(+), 61 deletions(-) diff --git a/src/scancode/cli.py b/src/scancode/cli.py index 409042cfe16..e9870124714 100644 --- a/src/scancode/cli.py +++ b/src/scancode/cli.py @@ -98,73 +98,21 @@ def wrap(self, timeout=None): info_text = ''' ScanCode scans code and other files for origin and license. Visit https://github.com/nexB/scancode-toolkit/ for support and download. -''' - -# FIXME: we should load NOTICE instead -notice_text = ''' -Software license -================ - -Copyright (c) 2016 nexB Inc. and others. All rights reserved. -http://nexb.com and https://github.com/nexB/scancode-toolkit/ -The ScanCode software is licensed under the Apache License version 2.0. -Data generated with ScanCode require an acknowledgment. -ScanCode is a trademark of nexB Inc. - -You may not use this software except in compliance with the License. -You may obtain a copy of the License at: http://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. - -When you publish or redistribute any data created with ScanCode or any ScanCode -derivative work, you must accompany this data with the following acknowledgment: -''' - -acknowledgment_text = ''' - Generated with ScanCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES - OR CONDITIONS OF ANY KIND, either express or implied. No content created from - ScanCode should be considered or used as legal advice. Consult an Attorney - for any legal advice. - ScanCode is a free software code scanning tool from nexB Inc. and others. - Visit https://github.com/nexB/scancode-toolkit/ for support and download. ''' -acknowledgment_text_json = acknowledgment_text.strip().replace(' ', '') - - -extra_notice_text = ''' +with open(os.path.join(os.path.dirname(__file__), '..', '..', 'NOTICE'), 'r') as notice_file: + notice_text = notice_file.read() -Third-party software licenses -============================= +delimiter = '\n\n\n' +[notice_text, extra_notice_text] = notice_text.split(delimiter, 1) +extra_notice_text = delimiter + extra_notice_text -ScanCode embeds third-party free and open source software packages under various -licenses including copyleft licenses. Some of the third-party software packages -are delivered as pre-built binaries. The origin and license of these packages is -documented by .ABOUT files. +delimiter = '\n\n ' +[notice_text, acknowledgment_text] = notice_text.split(delimiter, 1) +acknowledgment_text = delimiter + acknowledgment_text -The corresponding source code for pre-compiled third-party software is available -for immediate download from the same release page where you obtained ScanCode at: -https://github.com/nexB/scancode-toolkit/ -or https://github.com/nexB/scancode-thirdparty-src/ - -You may also contact us to request the source code by email at info@nexb.com or -by postal mail at: - nexB Inc., ScanCode open source code request - 735 Industrial Road, Suite #101, 94070 San Carlos, CA, USA -Please indicate in your communication the ScanCode version for which you are -requesting source code. - - -License for ScanCode datasets -============================= - -ScanCode includes datasets (e.g. for license detection) that are dedicated -to the Public Domain using the Creative Commons CC0 1.0 Universal (CC0 1.0) -Public Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0/ -''' +acknowledgment_text_json = acknowledgment_text.strip().replace(' ', '') def print_about(ctx, param, value):