Browse Source

Make the source tarball REUSE-compliant

This was a bit of a challenge, but _kind of_ works.
tags/v0.4.0a1
carmenbianca 5 months ago
parent
commit
ce000407da
Signed by: Carmen Bianca Bakker <carmenbianca@fsfe.org> GPG Key ID: 76EBA6F6B6EA2EC9
8 changed files with 40 additions and 9 deletions
  1. 11
    3
      .reuse/dep5
  2. 1
    0
      MANIFEST.in
  3. 6
    4
      Makefile
  4. 5
    0
      docs/authors.rst
  5. 5
    0
      docs/history.rst
  6. 5
    0
      docs/index.rst
  7. 5
    0
      docs/readme.rst
  8. 2
    2
      src/reuse/project.py

+ 11
- 3
.reuse/dep5 View File

@@ -3,14 +3,22 @@ Upstream-Name: reuse
Upstream-Contact: Carmen Bianca Bakker <carmenbianca@fsfe.org>
Source: https://github.com/fsfe/reuse-tool

Files: .bumpversion.cfg
Files: .bumpversion.cfg setup.cfg
Copyright: 2017-2019 Free Software Foundation Europe e.v.
License: GPL-3.0-or-later

Files: docs/*.rst
Copyright: 2017-2018 Free Software Foundation Europe e.V.
Files: docs/reuse*.rst
Copyright: 2017-2019 Free Software Foundation Europe e.V.
License: CC-BY-SA-4.0

Files: docs/modules.rst
Copyright: 2017-2019 Free Software Foundation Europe e.V.
License: CC-BY-SA-4.0

Files: tests/resources/*
Copyright: 2017-2019 Free Software Foundation Europe e.V.
License: GPL-3.0-or-later

Files: src/fsfe_reuse.egg-info/*
Copyright: 2017-2019 Free Software Foundation Europe e.V.
License: GPL-3.0-or-later

+ 1
- 0
MANIFEST.in View File

@@ -8,6 +8,7 @@ include CHANGELOG.rst
include Makefile
include tox.ini
include requirements.txt
include .reuse/dep5

recursive-include LICENSES *
recursive-include docs *

+ 6
- 4
Makefile View File

@@ -42,8 +42,6 @@ clean-docs: ## remove docs build artifacts
-$(MAKE) -C docs clean
rm -f docs/reuse*.rst
rm -f docs/modules.rst
rm -f docs/history.md
rm -f docs/readme.md

.PHONY: lint
lint: ## check with pylint
@@ -59,8 +57,12 @@ black: ## format with black
black .

.PHONY: reuse
reuse: ## check with self
reuse: dist ## check with self
reuse lint
tar -xf dist/fsfe-reuse*.tar.gz -C dist/
# This prevents the linter from using the project root as root.
git init dist/fsfe-reuse*/
cd dist/fsfe-reuse*/; reuse lint

.PHONY: test
test: ## run tests quickly
@@ -82,7 +84,7 @@ tox: ## run all tests against multiple versions of Python
tox

.PHONY: dist
dist: clean _pre-docs ## builds source and wheel package
dist: clean-build clean-pyc clean-docs _pre-docs ## builds source and wheel package
python setup.py sdist
python setup.py bdist_wheel
ls -l dist

+ 5
- 0
docs/authors.rst View File

@@ -1 +1,6 @@
..
SPDX-Copyright: 2017-2018 Free Software Foundation Europe e.V.

SPDX-License-Identifier: CC-BY-SA-4.0

.. include:: ../AUTHORS.rst

+ 5
- 0
docs/history.rst View File

@@ -1 +1,6 @@
..
SPDX-Copyright: 2017-2018 Free Software Foundation Europe e.V.

SPDX-License-Identifier: CC-BY-SA-4.0

.. include:: ../CHANGELOG.rst

+ 5
- 0
docs/index.rst View File

@@ -1,3 +1,8 @@
..
SPDX-Copyright: 2017-2018 Free Software Foundation Europe e.V.

SPDX-License-Identifier: CC-BY-SA-4.0

.. reuse documentation master file, created by
sphinx-quickstart on Wed Nov 1 14:41:46 2017.
You can adapt this file completely to your liking, but it should at least

+ 5
- 0
docs/readme.rst View File

@@ -1 +1,6 @@
..
SPDX-Copyright: 2017-2018 Free Software Foundation Europe e.V.

SPDX-License-Identifier: CC-BY-SA-4.0

.. include:: ../README.rst

+ 2
- 2
src/reuse/project.py View File

@@ -98,7 +98,7 @@ class Project:
_LOGGER.debug("ignoring %s", root / file_)
continue

_LOGGER.debug(_("yielding %s"), file_)
_LOGGER.debug(_("yielding %s"), root / file_)
yield root / file_

def spdx_info_of(self, path: PathLike) -> SpdxInfo:
@@ -249,7 +249,7 @@ class Project:
continue

path = self._relative_from_root(path)
_LOGGER.debug("searching %s for license tags", path)
_LOGGER.debug(_("determining identifier of %s"), path)

try:
identifier = self._identifier_of_license(path)

Loading…
Cancel
Save