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 LICENSE.txt --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 LICENSE.txt
2: python::
import malicense
malicense.main(package, snap=False)
# or
malicense.main(licfilename='LICENSE.txt', snap=False)
where ``package`` is the top level directory. A recommended use is putting that code into an "\_\_init\_\_.py" file, as it is done in the malicense package. Optional arguments are
* ``package`` (``None``): Python package; if None, uses ``licfilename``
* ``licfilename`` (``'LICENSE'``): Name of license file. If package is specified, it should be just the leaf
* ``snapfilename`` (``None``): Snapshot file; if None, puts in same directory as license file
* ``warn_with`` (``print``): Function called when warning on failure. warn_with='raise' will raise an error on failure.
* ``report_to`` (``None``): Address to send violation reports
* ``snap`` (``False``): If True, creates the snapshot file
Platform: UNKNOWN
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 LICENSE.txt --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 LICENSE.txt
2: python::
import malicense
malicense.main(package, snap=False)
# or
malicense.main(licfilename='LICENSE.txt', snap=False)
where ``package`` is the top level directory. A recommended use is putting that code into an "\_\_init\_\_.py" file, as it is done in the malicense package. Optional arguments are
* ``package`` (``None``): Python package; if None, uses ``licfilename``
* ``licfilename`` (``'LICENSE'``): Name of license file. If package is specified, it should be just the leaf
* ``snapfilename`` (``None``): Snapshot file; if None, puts in same directory as license file
* ``warn_with`` (``print``): Function called when warning on failure. warn_with='raise' will raise an error on failure.
* ``report_to`` (``None``): Address to send violation reports
* ``snap`` (``False``): If True, creates the snapshot file
Platform: UNKNOWN
Project details
Release history Release notifications | RSS feed
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 Distribution
File details
Details for the file malicense-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: malicense-0.0.3-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c061a3a31aeb7446b74a42b641c0e6c56499fd9668c4b87c37eda7acd7b86b9e |
|
MD5 | 412647b013adc71d0e1a202b879255be |
|
BLAKE2b-256 | 5310377568adb554a9316d86955159b4a56a9e35a60535ef3c29f832ed101200 |