The tool for checking and helping with compliance with the REUSE Initiative recommendations https://reuse.software
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
carmenbianca d76521506d
Add reports to pylint
5 days ago
.reuse Make the source tarball REUSE-compliant 1 month ago
LICENSES Do a massive refactoring 3 months ago
docs Move a build step from Makefile to docs/conf.py 1 week ago
po Move the compilation of .mo files into setup.py 3 months ago
src/reuse Add a message when the linter fails 1 week ago
tests Add a message when the linter fails 1 week ago
.bumpversion.cfg Do a massive refactoring 3 months ago
.editorconfig Do a massive refactoring 3 months ago
.gitignore Generate apidoc without additional build step 1 week ago
.gitlab-ci.yml Update tox.ini 2 months ago
.pre-commit-config.yaml Do a massive refactoring 3 months ago
.pylintrc Add reports to pylint 5 days ago
AUTHORS.rst Do a massive refactoring 3 months ago
CHANGELOG.md Add copyright headers to new Markdown files 1 week ago
Dockerfile Dockerize tool (#37) 1 week ago
MANIFEST.in Update MANIFEST.in 1 week ago
Makefile Remove unused Makefile target 1 week ago
README.md Merge pull request #48 from fsfe/spec-version 1 week ago
pyproject.toml Do a massive refactoring 3 months ago
requirements.txt Generate apidoc without additional build step 1 week ago
setup.py Update setup.py to handle Markdown files 1 week ago
tox.ini xfail some tests that fail in CI 2 months ago

README.md

reuse

reuse is a tool for compliance with the REUSE Initiative recommendations.

Background

Copyright and licensing is difficult, especially when reusing software from different projects that are released under various different licenses. The REUSE Initiative was started by the Free Software Foundation Europe (FSFE) to provide a set of recommendations to make licensing your free software projects easier. Not only do these recommendations make it easier for you to declare the licenses under which your works are released, but they also make it easier for a computer to understand how your project is licensed.

As a short summary, the recommendations are threefold:

  1. Choose and provide licenses
  2. Add copyright and licensing information to each file
  3. Confirm REUSE compliance

You are recommended to read the recommendations in full for more details. (IMPORTANT FIXME: These recommendations are currently out-of-date! See https://github.com/fsfe/reuse-docs.)

This tool exists to facilitate the developer in complying to the above recommendations.

There are other tools, such as FOSSology, that have a lot more features and functionality surrounding the analysis and inspection of copyright and licenses in software projects. reuse, on the other hand, is solely designed to be a simple tool to assist in compliance with the REUSE Initiative recommendations.

Install

To install reuse, you need to have the following pieces of software on your computer:

  • Python 3.6+
  • Pip

To install reuse, you only need to run the following command:

pip3 install --user fsfe-reuse

After this, make sure that ~/.local/bin is in your $PATH.

Usage

First, read the REUSE recommendations. In a nutshell:

  • Include the texts of all used licenses in your project.
  • Add a comment header to each file that says SPDX-License-Identifier: GPL-3.0-or-later.
  • Add a comment header to each file that says SPDX-Copyright: $YEAR $NAME. You can be flexible with the format, just make sure that the line starts with SPDX-Copyright:.

Once you have taken those steps (again, read the actual recommendations for better instructions), you can use this tool to verify whether your project is fully compliant with the REUSE recommendations. To check against the recommendations, use reuse lint:

~/Projects/reuse-tool $ reuse lint
[...]
Congratulations! Your project is REUSE compliant :-)

Run in Docker

REUSE is simple to include in CI/CD processes. This way, you can check for REUSE compliance for each build. In our resources for developers you can learn how to integrate the REUSE tool in Drone, Travis, or GitLab CI.

Within the fsfe/reuse Docker image available on Docker Hub, you can run the helper tool simply by executing reuse lint. To use the tool on your computer, you can mount your project directory and run reuse lint <path/to/directory>.

Maintainers

Contribute

Any pull requests or suggestions are welcome at https://github.com/fsfe/reuse-tool or via e-mail to one of the maintainers. General inquiries can be sent to contact@fsfe.org.

Starting local development is very simple, just execute the following commands:

git clone git@github.com:fsfe/reuse-tool.git
cd reuse-tool/
python3 -mvenv venv
source venv/bin/activate
make develop

You need to run make develop at least once to set up the virtualenv.

Next, run make help to see the available interactions.

License

Copyright © 2017-2019 Free Software Foundation Europe e.V.

This work is licensed under multiple licences. Because keeping this section up-to-date is challenging, here is a brief summary as of July 2019:

  • All original source code is licensed under GPL-3.0-or-later.
  • All documentation is licensed under CC-BY-SA-4.0.
  • Some configuration and data files are licensed under CC0-1.0.
  • Some code borrowed from spdx/tool-python is licensed under Apache-2.0.

For more accurate information, check the individual files.