# The whitelist and greylist defined in this file are used to determine the freedom
# status of a package in the PyPI repository.
#
# The whitelist should contain statements that clearly indicate a license stated
# here <https://www.gnu.org/licenses/license-list.html> to be free according to
# the FSDG
#
# The greylist is for statements that (a) do not refer to a specific license or (b)
# likely refer to a license that is free under the FSDG but is insufficiently clear.
#
# Many packages have multiple license statements. A package is accepted as free if
# - all license statements are whitelisted
# - OR at least one license statement is greylisted BUT
#   - at least one license statement is not greylisted
#   - AND all statements that either greylisted or whitelisted
#
# For example, "GPLV3" belongs on the whitelist because it clearly refers to a
# license that is free under the FSDG. "MIT LICENSE" also belongs on the whitelist
# because, although it could refer to one of two licenses, both licenses are free
# under the FSDG.
#
# On the other hand, "LICENSE :: DFSG APPROVED" belongs on the greylist because,
# while it likely refers to a free license we need to know specifically what the
# license is in order to verify that it is free under the FSDG. An empty string also
# belongs on the greylist, because while it gives us no information about the
# license, other license statements may be whitelisted and confirm that the license
# is free under the FSDG.
#
# I started with the complete set of license statements found in the PyPI repository
# I have deleted license statements that
# - are not found in more than one package
# - are obviously proprietary
# - indicate a license that is identified as non-free by gnu.org
# - indicate a license that does not resemble any mentioned by gnu.org
# - contain the full text of a license or would otherwise be a annoying to parse
#
# I have moved to the greylist
# - statements that indicate no particular license
#
# The information in the file is NOT ACCURATE at this time, because the whitelist
# still contains
# - statements that refer to a license that may or may not be free 
# - likely refer to a license that is free but aren't sufficiently clear
#
# The whitelist is sorted from most-to-least frequent. The ones toward the bottom
# occur in as few as 2 packages and can be liberally removed if unclear. The ones
# toward the top deserve more scrutiny.

whitelist = {
'LICENSE :: OSI APPROVED :: MIT LICENSE',
'LICENSE :: OSI APPROVED :: BSD LICENSE',
'MIT',
'LICENSE :: OSI APPROVED :: APACHE SOFTWARE LICENSE',
'LICENSE :: OSI APPROVED :: GNU AFFERO GENERAL PUBLIC LICENSE V3',
'LICENSE :: OSI APPROVED :: GNU GENERAL PUBLIC LICENSE (GPL)',
'BSD',
'LICENSE :: OSI APPROVED :: GNU GENERAL PUBLIC LICENSE V3 (GPLV3)',
'GPL',
'LICENSE :: OSI APPROVED :: GNU GENERAL PUBLIC LICENSE V3 OR LATER (GPLV3+)',
'MIT LICENSE',
'LICENSE :: OSI APPROVED :: GNU GENERAL PUBLIC LICENSE V2 (GPLV2)',
'LICENSE :: OSI APPROVED :: ZOPE PUBLIC LICENSE',
'GPLV3',
'LICENSE :: OSI APPROVED :: GNU LESSER GENERAL PUBLIC LICENSE V3 (LGPLV3)',
'LICENSE :: OSI APPROVED :: GNU LIBRARY OR LESSER GENERAL PUBLIC LICENSE (LGPL)',
'APACHE 2.0',
'LICENSE :: OSI APPROVED',
'LICENSE :: OSI APPROVED :: ISC LICENSE (ISCL)',
'APACHE LICENSE 2.0',
'LICENSE :: PUBLIC DOMAIN',
'LGPL',
'LICENSE :: OSI APPROVED :: GNU AFFERO GENERAL PUBLIC LICENSE V3 OR LATER (AGPLV3+)',
'LICENSE :: OSI APPROVED :: GNU LESSER GENERAL PUBLIC LICENSE V3 OR LATER (LGPLV3+)',
'LICENSE :: OSI APPROVED :: PYTHON SOFTWARE FOUNDATION LICENSE',
'APACHE LICENSE, VERSION 2.0',
'LICENSE :: OSI APPROVED :: GNU GENERAL PUBLIC LICENSE V2 OR LATER (GPLV2+)',
'LICENSE :: OTHER/PROPRIETARY LICENSE',
'LICENSE :: OSI APPROVED :: MOZILLA PUBLIC LICENSE 2.0 (MPL 2.0)',
'APACHE',
'LICENSE',
'BSD LICENSE',
'GPLV2',
'ZPL 2.1',
'GPL3',
'THE MIT LICENSE',
'WTFPL',
'GPL2',
'AGPL',
'THE MIT LICENSE (MIT)',
'APACHE-2.0',
'ZPL',
'PSF',
'APACHE 2',
'LICENSE :: OSI APPROVED :: GNU LESSER GENERAL PUBLIC LICENSE V2 OR LATER (LGPLV2+)',
'LICENSE :: FREE FOR NON-COMMERCIAL USE',
'BSD-DERIVED (HTTP://WWW.REPOZE.ORG/LICENSE.TXT)',
'AGPL-3.0',
'GPL V3',
'GNU',
'PUBLIC DOMAIN',
'LICENSE :: CC0 1.0 UNIVERSAL (CC0 1.0) PUBLIC DOMAIN DEDICATION',
'APACHE2',
'LICENSE :: OSI APPROVED :: GNU LESSER GENERAL PUBLIC LICENSE V2 (LGPLV2)',
'GNU GPLV3',
'BSD 3-CLAUSE',
'UNLICENSE',
'LGPLV3',
'HTTP://WWW.APACHE.ORG/LICENSES/LICENSE-2.0',
'AGPLV3',
'APACHE SOFTWARE LICENSE',
'GPL-3.0',
'MIT LICENCE',
'ISC',
'GPLV3+',
'APACHE LICENSE',
'MPL',
'LICENSE :: REPOZE PUBLIC LICENSE',
'GNU GENERAL PUBLIC LICENSE',
'GPLV2+',
'GNU GENERAL PUBLIC LICENSE V3.0',
'GNU GPL',
'BSD3',
'3-CLAUSE BSD',
'NEW BSD',
'APACHE LICENSE VERSION 2.0',
'GPL V2',
'GPL 2',
'GNU GPL V3',
'NEW BSD LICENSE',
'BSD-3',
'GPL-3',
'BSD 3-CLAUSE LICENSE',
'LICENSE :: OSI APPROVED :: ZLIB/LIBPNG LICENSE',
'LICENSE :: OSI APPROVED :: ACADEMIC FREE LICENSE (AFL)',
'APACHE V2',
'GPL3.0',
'BSD 2-CLAUSE',
'APACHE LICENSE (2.0)',
'MPL2',
'BSD-3-CLAUSE',
'GNU LGPL',
'GNU GENERAL PUBLIC LICENSE (GPL)',
'CC0',
'LICENSE :: OSI APPROVED :: ARTISTIC LICENSE',
'LGPL V3',
'GNU GENERAL PUBLIC LICENSE VERSION 3',
'GNU GENERAL PUBLIC LICENSE V3',
'BSD 3 CLAUSE',
'PYTHON',
'APACHE2.0',
'HTTP://OPENSOURCE.ORG/LICENSES/MIT',
'GNU GENERAL PUBLIC LICENSE V3 (GPLV3)',
'APACHE-2',
'MPL 2.0',
'BSD LICENCE, SEE LICENCE.TXT',
'APACHE LICENSE V2',
'SIMPLIFIED BSD',
'PYTHON SOFTWARE FOUNDATION LICENSE',
'MIT/X11',
'LICENSE :: OSI APPROVED :: CEA CNRS INRIA LOGICIEL LIBRE LICENSE, VERSION 2.1 (CECILL-2.1)',
'HTTP://WWW.OPENSOURCE.ORG/LICENSES/MIT-LICENSE.PHP',
'GNU GPLV2',
'APACHE 2.0 LICENSE',
'LGPLV2+',
'LGPL-3.0',
'APACHE LICENSE V2.0',
'LICENSE :: OSI APPROVED :: EUROPEAN UNION PUBLIC LICENCE 1.1 (EUPL 1.1)',
'GPL VERSION 2',
'GPL 3.0',
'GPL 3',
'GNU GENERAL PUBLIC LICENSE VERSION 3, 29 JUNE 2007',
'BSD-LIKE',
'BSD-2-CLAUSE',
'APACHE SOFTWARE LICENSE 2.0',
'SIMPLIFIED BSD LICENSE',
'MODIFIED BSD',
'LICENSE :: OSI APPROVED :: MOZILLA PUBLIC LICENSE 1.1 (MPL 1.1)',
'LGPLV3+',
'CC BY-SA 4.0 LICENSE',
'APACHE V2.0 LICENSE',
'APACHE LICENSE VERSION 2',
'MIT LICENCE, SEE LICENCE.TXT',
'LPGL, SEE LICENSE FILE.',
'GPL VERSION 3',
'GNU GPL V2',
'GNU GPL 3',
'BSD 2-CLAUSE LICENSE',
'3 CLAUSE BSD',
'2-CLAUSE BSD',
'BSD (3-CLAUSE)',
'APACHE V2.0',
'APACHE LICENSE VERSION 2.0, JANUARY 2004 HTTP://WWW.APACHE.ORG/LICENSES/',
# Licenses past this point are used by fewer than ten packages. Remove liberally if unclear.
'MPL-2.0',
'MIT/X',
'LGPL, SEE ALSO LICENSE.TXT',
'HTTP://WWW.APACHE.ORG/LICENSES/LICENSE-2.0.HTML',
'GPL V3.0',
'GPL V2.0',
'GNU LESSER GENERAL PUBLIC LICENSE',
'CECILL-B',
'BSD-2',
'BAYRELL LICENSE',
'MPLV2',
'ISC LICENSE',
'GUST FONT LICENSE (GFL)',
'GPL 2.0',
'GNU LESSER GENERAL PUBLIC LICENSE (LGPL)',
'GNU GPL3',
'FREEBSD',
'BSD (2-CLAUSE)',
'ASL 2.0',
'AGPLV3+',
'AGPL3+',
'PSF OR ZPL',
'NEW-BSD',
'MPL-2',
'MIT LICENSE (SEE LICENSE)',
'LGPL3',
'LGPL 2.1',
'GPL-2.0',
'GPL-2',
'GPL LICENSE',
'GNU GPL VERSION 3',
'GNU AFFERO GENERAL PUBLIC LICENSE V3',
'GLPV3',
'EXPAT',
'BSD (3 CLAUSE)',
'APACHE LICENSE VERSION 2.0, JANUARY 2004',
'APACHE LICENSE 2',
'APACHE 2 LICENSE',
'THE MIT LICENSE: HTTP://WWW.OPENSOURCE.ORG/LICENSES/MIT-LICENSE.PHP',
'MOZILLA PUBLIC LICENSE VERSION 2.0',
'MODIFIED BSD LICENSE',
'MIT BSD',
'LICENSE GPL-2',
'LGPLV2.1',
'LGPL-2.1+',
'LGPL, SEE LICENSE FILE.',
'HTTPS://WWW.GNU.ORG/LICENSES/AGPL-3.0.HTML',
'GPLV3 OR LATER',
'GNU GENERAL PUBLIC LICENSE, VERSION 2',
'ECLIPSE PUBLIC LICENSE',
'CECILL V2',
'CC-BY. CREATIVE COMMONS ATTRIBUTION.',
'CC BY-SA 4.0',
'BSD 3-CLAUSE "NEW" OR "REVISED" LICENSE',
'APACHE LICENCE V2.0',
'AGPL3',
'UNLICENSE.ORG',
'THE UNLICENSE',
'REVISED BSD LICENSE',
'REVISED BSD',
'OSI',
'LICENSE :: OSI APPROVED :: UNIVERSITY OF ILLINOIS/NCSA OPEN SOURCE LICENSE',
'LGPL-3',
'LGPL 3.0',
'HTTPS://WWW.GNU.ORG/LICENSES/GPL-3.0.HTML',
'GPL V3 OR LATER',
'GPL 2.0/LGPL 2.1',
'GNU GPLV3+',
'GNU GPL 3.0',
'GNU GENERAL PUBLIC LICENSE, VERSION 3',
'GNU AGPLV3',
'GNU AFFERO GENERAL PUBLIC LICENSE V3.0',
'GENERAL PUBLIC LICENCE 2',
'EUPL',
'EPL',
'CREATIVE COMMONS ATTRIBUTION 3.0 UNPORTED',
'CECILL-C',
'CECILL',
'CDDL',
'CC0 (COPYRIGHT WAIVED)',
'BSD2CLAUSE',
'APACHE LICENSE, VERSION 2',
'APACHE LICENCE 2.0',
'AGPL, SEE ALSO LICENSE.TXT',
'AFFERO GPL V3',
'3-BSD',
'X11',
'PYTHON LICENSE',
'PYTHON (MIT STYLE)',
'MIT-LICENSE',
'MIT LICENSE, SEE LICENSE.TXT',
'MIT (SEE LICENSE.TXT)',
'LICENSE-MIT',
'LICENSE :: OSI APPROVED :: PYTHON LICENSE (CNRI PYTHON LICENSE)',
'LICENSE :: OSI APPROVED :: ECLIPSE PUBLIC LICENSE 2.0 (EPL-2.0)',
'LICENSE :: OSI APPROVED :: COMMON PUBLIC LICENSE',
'LGPLV2.1+',
'LGPL-2.1',
'LGPL 2.1 OR LATER',
'HTTP://OPENSOURCE.ORG/LICENSES/GPL-3.0',
'GPLV2, SEE LICENSE.TXT',
'GPL3+',
'GPL2.0',
'GPL/PROPRIETARY',
'GPL-3.0-OR-LATER',
'GPL V2 OR LATER',
'GNU3',
'GNU-GPL',
'GNU V3',
'GNU LGPLV3',
'GNU GPL V2.0',
'GNU GENERAL PUBLIC LICENSE VERSION 2',
'GNU GENERAL PUBLIC LICENSE V2',
'GNU GENERAL PUBLIC LICENCE',
'GNU AFFERO GENERAL PUBLIC LICENSE VERSION 3, 19 NOVEMBER 2007',
'GNU AFFERO GENERAL PUBLIC LICENSE',
'GENERAL PUBLIC LICENSE V. 3',
'DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE VERSION 2, DECEMBER 2004',
'DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE',
'CREATIVE COMMONS ATTRIBUTION-SHAREALIKE 4.0 INTERNATIONAL LICENSE',
'BSD2',
'BSD-DERIVED',
'BSD WITH ATTRIBUTION',
'BSD LICENCE',
'BSD 3',
'BOOST SOFTWARE LICENSE',
'BITTORRENT OPEN SOURCE LICENSE',
'APLV2',
'3-CLAUSE BSD LICENSE',
'0BSD (BSD ZERO CLAUSE LICENSE)',
'ZPL2.1',
'ZPL (SEE LICENSE.TXT)',
'ZLIB',
'THE MIT LICENCE',
'OSI APPROVED :: BSD 3-CLAUSE LICENSE',
'OPEN SOFTWARE LICENSE VERSION 3.0',
'MIT-STYLE',
'MIT LICENSE, SEE LICENSE FILE',
'MIT - HTTP://OPENSOURCE.ORG/LICENSES/MIT-LICENSE.PHP',
'LICENSE :: OSI APPROVED :: BOOST SOFTWARE LICENSE 1.0 (BSL-1.0)',
'LICENSE :: OSI APPROVED :: APPLE PUBLIC SOURCE LICENSE',
'LGPL V3.0',
'LGPL V2',
'LGPL 2.0',
'ISCL',
'HTTP://WWW.GNU.ORG/LICENSES/GPL-2.0.HTML',
'HTTP://WWW.FSF.ORG/LICENSING/LICENSES/AGPL-3.0.HTML',
'HTTP://CREATIVECOMMONS.ORG/LICENSES/BY-SA/3.0/',
'GPLV3.0',
'GPLV2 OR LATER',
'GPLV2 OR GPLV3',
'GPL-3.0+',
'GNU LICENSE',
'GNU LGPL V2.1',
'GNU LGPL 2.1',
'GNU LESSER GENERAL PUBLIC LICENSE V3.0',
'GNU LESSER GENERAL PUBLIC LICENSE V3 (LGPLV3)',
'GNU LESSER GENERAL PUBLIC LICENSE V3',
'GNU GPLV2+',
'GNU GPL, GNU LGPL',
'GNU GPL V3.0',
'GNU GPL V2 OR LATER',
'GNU GENERAL PUBLIC LICENSE V3 OR LATER (GPLV3+)',
'GNU GENERAL PUBLIC LICENSE V2.0',
'FREEBSD LICENSE',
'CREATIVE COMMONS ATTRIBUTION-SHAREALIKE 3.0 UNPORTED LICENSE',
'CREATIVE COMMONS ATTRIBUTION-SHARE ALIKE LICENSE',
'CC BY-SA 3.0',
'CC BY 4.0',
'CC BY 3.0',
'BSD-LIKE (HTTP://REPOZE.ORG/LICENSE.HTML)',
'BSD LICENSE, SEE LICENSE.TXT',
'BSD LICENCE, SEE LICENCE',
'BSD 2 CLAUSE',
'ASL2.0',
'ASL',
'APL 2.0',
'APACHE VERSION 2',
'APACHE SOFTWARE LICENSE V2',
'APACHE SOFTWARE LICENSE (HTTP://WWW.APACHE.ORG/LICENSES/LICENSE-2.0)',
'APACHE 2.0, SEE LICENCE',
'ALL CODE IS RELEASED UNDER THE MIT LICENSE:',
'AGPLV3 OR PERMISSIVE FOR USE WITH OPEN SOURCE DATABASES',
'AGPLV3 OR LATER',
'AGPL V3 OR LATER',
'AGPL 3.0',
'3-CLAUSE BSD (SEE LICENSE FILE)',
'XFREE86',
'WTFPL-2',
'UNLICENSE (A.K.A. PUBLIC DOMAIN)',
'THE APACHE LICENSE, VERSION 2.0: HTTP://WWW.APACHE.ORG/LICENSES/LICENSE-2.0',
'PUBLIC DOMAIN (WTFPL)',
'PSF LIKE',
'OSI APPROVED :: EUROPEAN UNION PUBLIC LICENCE 1.1 (EUPL 1.1)',
'OPEN BSD',
'NEW-STYLE BSD',
'NCSA',
'MOZILLA PUBLIC LICENSE 2.0 (MPL 2.0)',
'MOZILLA PUBLIC LICENSE 2.0',
'MOZILLA',
'MIT/BSD',
'MIT-ZERO',
'MIT-LICENSE.TXT',
'MIT STYLE',
'MIT LICENSE, SEE LICENSE.',
'MIT LICENSE, SEE LICENCE.TXT',
'MIT / BSD',
'MIT - SEE LICENSE FILE',
'LICENSE :: OSI APPROVED :: IBM PUBLIC LICENSE',
'LICENSE :: CECILL-B FREE SOFTWARE LICENSE AGREEMENT (CECILL-B)',
'LGPLV2',
'LGPL-3+',
'LGPL V3 OR LATER',
'LGPL V2.1',
'LGPL LICENSE',
'LGPL LICENCE, SEE LICENCE.TXT',
'LGPL 3',
'HTTPS://WWW.GNU.ORG/LICENSES/LGPL-2.1.HTML',
'HTTPS://OPENSOURCE.ORG/LICENSES/BSD-3-CLAUSE',
'HTTP://WWW.GNU.ORG/LICENSES/GPL.HTML',
'HTTP://CREATIVECOMMONS.ORG/LICENSES/PUBLICDOMAIN/',
'GPLV3 OR ANY LATER VERSION',
'GPLV2 OR ANY LATER VERSION',
'GPL3 LICENSE',
'GPL2+',
'GPL-V3',
'GPL V3+',
'GPL V3 OR ANY LATER VERSION',
'GPL V2 OR V3 (AT YOUR OPTION)',
'GPL V 3',
'GPL 3+',
'GNUV3',
'GNU3.0',
'GNU/GPLV3',
'GNU/GPLV2',
'GNU PUBLIC GENERAL LICENSE',
'GNU LGPL V3',
'GNU LESSER GPL',
'GNU LESSER GENERAL PUBLIC LICENSE, VERSION 2.1',
'GNU LESSER GENERAL PUBLIC LICENSE V3 OR LATER (LGPLV3+)',
'GNU LESSER GENERAL PUBLIC LICENSE V3 OR LATER',
'GNU LESSER GENERAL PUBLIC LICENSE (LGPL), VERSION 3 OR ANY LATER VERSION',
'GNU GPLV3.0',
'GNU GPL-3',
'GNU GPL V.3',
'GNU GPL 2',
'GNU GENERAL PUBLIC LICENSE, VERSION 3 (GPL-3.0)',
'GNU GENERAL PUBLIC LICENSE, VERSION 2 OR LATER',
'GNU GENERAL PUBLIC LICENSE VERSION 2.0',
'GNU GENERAL PUBLIC LICENSE V2 OR LATER (GPLV2+)',
'GNU GENERAL PUBLIC LICENSE V2 (GPLV2)',
'GNU GENERAL PUBLIC LICENSE 3.0',
'GNU GENERAL PUBLIC LICENCSE',
'GNU AGPL V3',
'GNU AGPL',
'GNU AFFERO GENERAL PUBLIC LICENSE, VERSION 3.0',
'GNU 3',
'GNU (V3) LICENSE',
'GENERAL PUBLIC LICENSE',
'GENERAL PUBLIC LICENCE 3',
'EUROPEAN UNION PUBLIC LICENSE 1.1',
'EUPL 1.2',
'CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL PUBLIC LICENSE',
'COPYING.WTFPL',
'CLEAR BSD',
'CC0 1.0 UNIVERSAL',
'CC-0',
'CC LICENCE',
'BSD-THREE-CLAUSE',
'BSD-STYLE LICENSE, SEE LICENSE.TXT',
'BSD-STYLE LICENSE',
'BSD-NEW LICENSE',
'BSD-NEW',
'BSD-DERIVED. SEE LICENSE FILE',
'BSD-DERIVED (SEE HTTP://WWW.REPOZE.ORG/LICENSE.TXT)',
'BSD-CLAUSE3',
'BSD-3C',
'BSD-3-CLAUSE-LBNL',
'BSD, GPL',
'BSD STYLE',
'BSD SIMPLIFIED',
'BSD OR APACHE LICENSE, VERSION 2.0',
'BSD LICENSE, SEE LICENSE',
'BSD LICENSE 2.0',
'BSD 3-CLAUSE LICENSE, SEE THE LICENSE FILE FOR DETAILS',
'BSD 3-CLAUSE ("BSD NEW" OR "BSD SIMPLIFIED") LICENSE',
'BSD 3 CLAUSE LICENSE',
'BSD (3-CLAUSE) LICENSE',
'BDS 3 CLAUSE',
'BDS',
'ASLV2',
'ASF',
'APL2',
'APACHE2 LICENSE',
'APACHE-V2.0',
'APACHE SOFTWARE LICENSE V2.0',
'APACHE LICENCE, VERSION 2.0',
'APACHE COMMON 2.0',
'APACHE 2.0, SEE LICENCE.TXT',
'AGPL-3',
'AGPL V3',
'AGPL 3',
'AFFERO GNU PUBLIC LICENSE V3',
'3-CLAUSE BSD <HTTP://WWW.OPENSOURCE.ORG/LICENSES/BSD-LICENSE.PHP>',
'2-CLAUSE BSD, 3-CLAUSE BSD',
}

greylist = {
'',
'UNKNOWN',
'LICENSE :: OSI APPROVED',
'LICENSE :: FREELY DISTRIBUTABLE',
'LICENSE :: DFSG APPROVED'
}
