@@ -0,0 +1,2368 @@
+# This file is part of Eigen, a lightweight C++ template library%0A# for linear algebra.%0A#%0A# Copyright (C) 2012 Keir Mierle %3Cmierle@gmail.com%3E%0A#%0A# This Source Code Form is subject to the terms of the Mozilla%0A# Public License v. 2.0. If a copy of the MPL was not distributed%0A# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.%0A#%0A# Author: mierle@gmail.com (Keir Mierle)%0A#%0A# Make the long-awaited conversion to MPL.%0A%0Algpl3_header = '''%0A// Eigen is free software; you can redistribute it and/or%0A// modify it under the terms of the GNU Lesser General Public%0A// License as published by the Free Software Foundation; either%0A// version 3 of the License, or (at your option) any later version.%0A//%0A// Alternatively, you can redistribute it and/or%0A// modify it under the terms of the GNU General Public License as%0A// published by the Free Software Foundation; either version 2 of%0A// the License, or (at your option) any later version.%0A//%0A// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY%0A// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS%0A// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the%0A// GNU General Public License for more details.%0A//%0A// You should have received a copy of the GNU Lesser General Public%0A// License and a copy of the GNU General Public License along with%0A// Eigen. If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A'''%0A%0Ampl2_header = %22%22%22%0A// This Source Code Form is subject to the terms of the Mozilla%0A// Public License v. 2.0. If a copy of the MPL was not distributed%0A// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.%0A%22%22%22%0A%0Aimport os%0Aimport sys%0A%0Aexclusions = set(%5B'relicense.py'%5D)%0A%0Adef update(text):%0A  if text.find(lgpl3_header) == -1:%0A    return text, False%0A  return text.replace(lgpl3_header, mpl2_header), True%0A%0Arootdir = sys.argv%5B1%5D%0Afor root, sub_folders, files in os.walk(rootdir):%0A    for basename in files:%0A        if basename in exclusions:%0A          print 'SKIPPED', filename%0A          continue%0A        filename = os.path.join(root, basename)%0A        fo = file(filename)%0A        text = fo.read()%0A        fo.close()%0A%0A        text, updated = update(text)%0A        if updated:%0A          fo = file(filename, %22w%22)%0A          fo.write(text)%0A          fo.close()%0A          print 'UPDATED', filename%0A        else:%0A          print '       ', filename%0A

Add preliminary script to relicense Eigen to MPL2.