Skip to main content

Verify integrity of LICENSEs

Project description

Copyright (c) 2018 Alexander Tait

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Description-Content-Type: UNKNOWN
Description: License checker
==============================

This is a package for verifying that a license file in an open source project has not changed since distribution. Most licenses require inclusion of that license. This checks that it is the case.

Installation
------------
``$ pip install malicense``

Setup
-----
Your project must have a "LICENSE" file in the top directory of the package (not the project). You must take a snapshot of the license with::

$ malicense --snap

Then, git commit to save the snapshot placed in the new file ``.lichash``.

Usage
-----
1: UNIX command line executable exits with code 2 if validation fails. In the package top directory::

$ malicense

2: python::

import malicense
malicense.main(package, snap=False)
# or
malicense.main(licfilename='./LICENSE', snap=False)

where ``package`` is the top level directory. A recommended use is putting that code into an "\_\_init\_\_.py" file. Optional arguments are::

def verify(package, warnWith=print, reportTo=None):
''' Check the license snapshot and compare to current license

:param str package: top level directory or a python package
:param func warnWith: function that will be called to say "unlicensed". None or False means it does nothing on invalid
:param reportTo: more inputs
:returns bool: True if it is valid
'''

Platform: UNKNOWN

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

malicense-0.0.1-py3.6.egg (13.6 kB view details)

Uploaded Source

malicense-0.0.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file malicense-0.0.1-py3.6.egg.

File metadata

File hashes

Hashes for malicense-0.0.1-py3.6.egg
Algorithm Hash digest
SHA256 a968239173e00b146423c29b9b025da4146c3952d03f47e3ad55ae1bf2e014bb
MD5 64e6eda3f4dd1a72bb1605d105ac29b7
BLAKE2b-256 d7885a1811e56e84c553e4abb670274a09ab5d1ac2264f73c5fb0c5b489bb4ed

See more details on using hashes here.

File details

Details for the file malicense-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for malicense-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98b11159ae4fc06592b8252f3e62a92f0986710a1715950b1ba246d8f186eddb
MD5 19155d7768778f1e1c3b7e3ef84cc54d
BLAKE2b-256 e9a325fd8646325ca653255a6ae9e4f1a7576779dc731c308503497b3618fd89

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page