The tool for checking and helping with compliance with the REUSE Initiative recommendations https://reuse.software
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
carmenbianca a14027f9f8
Merge pull request #121 from fsfe/yaml
12 часов назад
.reuse Make the source tarball REUSE-compliant 4 месяцев назад
LICENSES Do a massive refactoring 7 месяцев назад
docs Merge branch 'master' into fix-shebang 2 недель назад
po Fix create-pot 2 месяцев назад
src/reuse Add .yaml/.yml support 12 часов назад
tests Fix `addheader --explicit-license` to not break on unsupported files 1 день назад
.bumpversion.cfg Bump version: 0.5.1 → 0.5.2 2 недель назад
.editorconfig Add usage documentation for addheader 2 месяцев назад
.gitignore Use SPDX-FileCopyrightText instead of SPDX-Copyright 3 месяцев назад
.gitlab-ci.yml Use SPDX-FileCopyrightText instead of SPDX-Copyright 3 месяцев назад
.pre-commit-config.yaml Use SPDX-FileCopyrightText instead of SPDX-Copyright 3 месяцев назад
.pylintrc Disable pylint duplicate-code 3 месяцев назад
AUTHORS.rst Add Kirill as contributor 2 недель назад
CHANGELOG.md Add .yaml/.yml support 12 часов назад
Dockerfile Use SPDX-FileCopyrightText instead of SPDX-Copyright 3 месяцев назад
MANIFEST.in Use SPDX-FileCopyrightText instead of SPDX-Copyright 3 месяцев назад
Makefile Fix create-pot 2 месяцев назад
README.md use dynamically created compliance badge 3 недель назад
pyproject.toml Use SPDX-FileCopyrightText instead of SPDX-Copyright 3 месяцев назад
requirements.txt Handle binary and .license files 2 месяцев назад
setup.py Bump version: 0.5.1 → 0.5.2 2 недель назад
tox.ini Use SPDX-FileCopyrightText instead of SPDX-Copyright 3 месяцев назад

README.md

reuse

REUSE status

reuse is a tool for compliance with the REUSE recommendations.

Background

Copyright and licensing is difficult, especially when reusing software from different projects that are released under various different licenses. REUSE 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 our tutorial for a step-by-step guide through these three steps. The FAQ covers basic questions about licensing, copyright, and more complex use cases. Advanced users and integrators will find the full specification helpful.

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

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

Install

Installation via pip

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

  • Python 3.6+
  • pip

You then only need to run the following command:

pip3 install --user fsfe-reuse

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

Installation via package managers

There are packages available for easy install on some operating systems. You are welcome to help us package this tool for more distributions!

Installation from source

You can also install this tool from the source code, but we recommend the methods above for easier and more stable updates. Please make sure the requirements for the installation via pip are present on your machine.

python3 setup.py install

Usage

First, read the REUSE tutorial. In a nutshell:

  1. Put your licenses in the LICENSES/ directory.
  2. Add a comment header to each file that says SPDX-License-Identifier: GPL-3.0-or-later, and SPDX-FileCopyrightText: $YEAR $NAME. You can be flexible with the format, just make sure that the line starts with SPDX-FileCopyrightText:.
  3. Verify your work using this tool.

To check against the recommendations, use reuse lint:

~/Projects/reuse-tool $ reuse lint
[...]

Congratulations! Your project is compliant with version 3.0 of the REUSE Specification :-)

This tool can do various more things, detailed in the documentation. Here a short summary:

  • addheader --- Add copyright and/or licensing information to the header of a file.

  • download --- Download the specified license into the LICENSES/ directory.

  • init --- Set up the project for REUSE compliance.

  • lint --- Verify the project for REUSE compliance.

  • spdx --- Generate an SPDX Document of all files in the project.

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 reuse@lists.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.