Hello community, here is the log from the commit of package reuse for openSUSE:Factory checked in at 2018-08-15 10:38:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/reuse (Old) and /work/SRC/openSUSE:Factory/.reuse.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "reuse" Wed Aug 15 10:38:47 2018 rev:4 rq:629261 version:0.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/reuse/reuse.changes 2018-05-16 18:45:10.175540103 +0200 +++ /work/SRC/openSUSE:Factory/.reuse.new/reuse.changes 2018-08-15 10:38:53.164345442 +0200 @@ -1,0 +2,6 @@ +Tue Aug 14 16:14:17 UTC 2018 - [email protected] + +- Update to version 0.3.1: + + Finding of root directory fixed when using pygit2. + +------------------------------------------------------------------- Old: ---- fsfe-reuse-0.3.0.tar.gz New: ---- fsfe-reuse-0.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ reuse.spec ++++++ --- /var/tmp/diff_new_pack.Rc3QjV/_old 2018-08-15 10:38:54.360347623 +0200 +++ /var/tmp/diff_new_pack.Rc3QjV/_new 2018-08-15 10:38:54.364347630 +0200 @@ -19,7 +19,7 @@ %bcond_without test Name: reuse -Version: 0.3.0 +Version: 0.3.1 Release: 0 Summary: A tool for compliance with the REUSE Initiative recommendations License: GPL-3.0-or-later ++++++ fsfe-reuse-0.3.0.tar.gz -> fsfe-reuse-0.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsfe-reuse-0.3.0/CHANGELOG.md new/fsfe-reuse-0.3.1/CHANGELOG.md --- old/fsfe-reuse-0.3.0/CHANGELOG.md 2018-05-16 14:44:07.000000000 +0200 +++ new/fsfe-reuse-0.3.1/CHANGELOG.md 2018-08-14 18:00:58.000000000 +0200 @@ -17,6 +17,12 @@ The versions follow [semantic versioning](https://semver.org). +## 0.3.1 - 2018-07-14 + +### Fixed + +- When using reuse from a child directory using pygit2, correctly find the root. + ## 0.3.0 - 2018-05-16 ### Changed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsfe-reuse-0.3.0/PKG-INFO new/fsfe-reuse-0.3.1/PKG-INFO --- old/fsfe-reuse-0.3.0/PKG-INFO 2018-05-16 14:46:18.000000000 +0200 +++ new/fsfe-reuse-0.3.1/PKG-INFO 2018-08-14 18:01:28.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: fsfe-reuse -Version: 0.3.0 +Version: 0.3.1 Summary: reuse is a tool for compliance with the REUSE Initiative recommendations. Home-page: https://git.fsfe.org/reuse/reuse Author: Carmen Bianca Bakker @@ -10,10 +10,15 @@ Description: reuse ===== - |license| |version| |python| |reuse| |standard-readme| |status| + `license <https://www.gnu.org/licenses/gpl-3.0.html>`__ + `version <https://pypi.python.org/pypi/fsfe-reuse>`__ + `python <https://pypi.python.org/pypi/fsfe-reuse>`__ + `reuse <https://reuse.software/>`__ + `standard-readme <https://github.com/RichardLitt/standard-readme>`__ + `status <https://pypi.python.org/pypi/fsfe-reuse>`__ - reuse is a tool for compliance with the `REUSE - Initiative <https://reuse.software/>`__ recommendations. + reuse is a tool for compliance with the `REUSE + Initiative <https://reuse.software/>`__ recommendations. - Free Software: GPL-3.0-or-later @@ -72,12 +77,12 @@ - ``python3-pygit2`` - You can install ``python3-pygit2`` via your operating system's package + You can install ``python3-pygit2`` via your operating system’s package manager. For Debian-like GNU/Linux distributions this would be: :: - apt-get install python3-pygit2 + apt-get install python3-pygit2 Note that simply installing ``pygit2`` via ``pip`` does not work as this omits the ``libgit2`` dependency. @@ -90,7 +95,7 @@ :: - pip3 install --user fsfe-reuse + pip3 install --user fsfe-reuse After this, make sure that ``~/.local/bin`` is in your ``$PATH``. @@ -102,14 +107,15 @@ - Include the texts of all used licenses in your project. - - A special note on the GPL: If you use - ``Valid-License-Identifier: GPL-3.0`` or name the file - ``LICENSES/GPL-3.0.txt``, this will catch all the following licenses: - ``GPL-3.0``, ``GPL-3.0+``, ``GPL-3.0-only`` and ``GPL-3.0-or-later``. - This applies to the entire GPL family of licenses. + - A special note on the GPL: If you use + ``Valid-License-Identifier: GPL-3.0`` or name the file + ``LICENSES/GPL-3.0.txt``, this will catch all the following + licenses: ``GPL-3.0``, ``GPL-3.0+``, ``GPL-3.0-only`` and + ``GPL-3.0-or-later``. This applies to the entire GPL family of + licenses. - Add a comment header to each file that says - ``SPDX-License-Identifier: GPL-3.0-or-later``. Replace + ``SPDX-License-Identifier: GPL-3.0-or-later``. Replace ``GPL-3.0-or-later`` with the license that applies to the file. If you cannot edit the comment header, include a `debian/copyright <https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/>`__ @@ -127,12 +133,12 @@ :: - ~/Projects/curl$ reuse lint - .gitattributes - README - docs/libcurl/CMakeLists.txt - lib/.gitattributes - [...] + ~/Projects/curl$ reuse lint + .gitattributes + README + docs/libcurl/CMakeLists.txt + lib/.gitattributes + [...] All the listed files have no licence information associated with them. @@ -140,18 +146,18 @@ :: - ~/Projects/curll$ reuse compile - SPDXVersion: SPDX-2.1 - DataLicense: CC0-1.0 - SPDXID: SPDXRef-DOCUMENT - DocumentName: curl - DocumentNamespace: http://spdx.org/spdxdocs/spdx-v2.1-c8c7047c-855c-45a6-bed0-c23900498a79 - Creator: Person: Anonymous () - Creator: Organization: Anonymous () - Creator: Tool: reuse-0.0.4 - Created: 2017-11-15T11:42:28Z - CreatorComment: <text>This document was created automatically using available reuse information consistent with the REUSE Initiative.</text> - [...] + ~/Projects/curll$ reuse compile + SPDXVersion: SPDX-2.1 + DataLicense: CC0-1.0 + SPDXID: SPDXRef-DOCUMENT + DocumentName: curl + DocumentNamespace: http://spdx.org/spdxdocs/spdx-v2.1-c8c7047c-855c-45a6-bed0-c23900498a79 + Creator: Person: Anonymous () + Creator: Organization: Anonymous () + Creator: Tool: reuse-0.0.4 + Created: 2017-11-15T11:42:28Z + CreatorComment: <text>This document was created automatically using available reuse information consistent with the REUSE Initiative.</text> + [...] Ideally, you would distribute this bill of materials together with the tarfile distribution of your project. @@ -180,11 +186,11 @@ :: - git clone [email protected]:reuse/reuse.git - cd reuse/ - python3 -mvenv venv - source venv/bin/activate - make develop + git clone [email protected]:reuse/reuse.git + cd reuse/ + python3 -mvenv venv + source venv/bin/activate + make develop You need to run ``make develop`` at least once to set up the virtualenv. @@ -197,19 +203,6 @@ Licensed under the GNU General Public License version 3 or later. - .. |license| image:: https://img.shields.io/pypi/l/fsfe-reuse.svg - :target: https://www.gnu.org/licenses/gpl-3.0.html - .. |version| image:: https://img.shields.io/pypi/v/fsfe-reuse.svg - :target: https://pypi.python.org/pypi/fsfe-reuse - .. |python| image:: https://img.shields.io/pypi/pyversions/fsfe-reuse.svg - :target: https://pypi.python.org/pypi/fsfe-reuse - .. |reuse| image:: https://reuse.software/badge/reuse-compliant.svg - :target: https://reuse.software/ - .. |standard-readme| image:: https://img.shields.io/badge/readme_style-standard-brightgreen.svg - :target: https://github.com/RichardLitt/standard-readme - .. |status| image:: https://img.shields.io/pypi/status/fsfe-reuse.svg - :target: https://pypi.python.org/pypi/fsfe-reuse - Platform: UNKNOWN Classifier: Development Status :: 3 - Alpha Classifier: Intended Audience :: Developers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsfe-reuse-0.3.0/docs/conf.py new/fsfe-reuse-0.3.1/docs/conf.py --- old/fsfe-reuse-0.3.0/docs/conf.py 2018-05-16 14:44:39.000000000 +0200 +++ new/fsfe-reuse-0.3.1/docs/conf.py 2018-08-14 18:00:58.000000000 +0200 @@ -84,7 +84,7 @@ # built documents. # # The short X.Y version. -version = '0.3.0' +version = '0.3.1' # The full version, including alpha/beta/rc tags. release = version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsfe-reuse-0.3.0/docs/history.md new/fsfe-reuse-0.3.1/docs/history.md --- old/fsfe-reuse-0.3.0/docs/history.md 2018-05-16 14:46:14.000000000 +0200 +++ new/fsfe-reuse-0.3.1/docs/history.md 2018-08-14 18:01:23.000000000 +0200 @@ -17,6 +17,12 @@ The versions follow [semantic versioning](https://semver.org). +## 0.3.1 - 2018-07-14 + +### Fixed + +- When using reuse from a child directory using pygit2, correctly find the root. + ## 0.3.0 - 2018-05-16 ### Changed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsfe-reuse-0.3.0/setup.cfg new/fsfe-reuse-0.3.1/setup.cfg --- old/fsfe-reuse-0.3.0/setup.cfg 2018-05-16 14:46:18.000000000 +0200 +++ new/fsfe-reuse-0.3.1/setup.cfg 2018-08-14 18:01:28.000000000 +0200 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.3.0 +current_version = 0.3.1 commit = True tag = False parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<release>(a|b|rc)?)(?P<releasenumber>\d*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsfe-reuse-0.3.0/setup.py new/fsfe-reuse-0.3.1/setup.py --- old/fsfe-reuse-0.3.0/setup.py 2018-05-16 14:44:39.000000000 +0200 +++ new/fsfe-reuse-0.3.1/setup.py 2018-08-14 18:00:58.000000000 +0200 @@ -64,7 +64,7 @@ if __name__ == '__main__': setup( name='fsfe-reuse', - version='0.3.0', + version='0.3.1', url='https://git.fsfe.org/reuse/reuse', license='GPL-3.0-or-later', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsfe-reuse-0.3.0/src/fsfe_reuse.egg-info/PKG-INFO new/fsfe-reuse-0.3.1/src/fsfe_reuse.egg-info/PKG-INFO --- old/fsfe-reuse-0.3.0/src/fsfe_reuse.egg-info/PKG-INFO 2018-05-16 14:46:18.000000000 +0200 +++ new/fsfe-reuse-0.3.1/src/fsfe_reuse.egg-info/PKG-INFO 2018-08-14 18:01:28.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: fsfe-reuse -Version: 0.3.0 +Version: 0.3.1 Summary: reuse is a tool for compliance with the REUSE Initiative recommendations. Home-page: https://git.fsfe.org/reuse/reuse Author: Carmen Bianca Bakker @@ -10,10 +10,15 @@ Description: reuse ===== - |license| |version| |python| |reuse| |standard-readme| |status| + `license <https://www.gnu.org/licenses/gpl-3.0.html>`__ + `version <https://pypi.python.org/pypi/fsfe-reuse>`__ + `python <https://pypi.python.org/pypi/fsfe-reuse>`__ + `reuse <https://reuse.software/>`__ + `standard-readme <https://github.com/RichardLitt/standard-readme>`__ + `status <https://pypi.python.org/pypi/fsfe-reuse>`__ - reuse is a tool for compliance with the `REUSE - Initiative <https://reuse.software/>`__ recommendations. + reuse is a tool for compliance with the `REUSE + Initiative <https://reuse.software/>`__ recommendations. - Free Software: GPL-3.0-or-later @@ -72,12 +77,12 @@ - ``python3-pygit2`` - You can install ``python3-pygit2`` via your operating system's package + You can install ``python3-pygit2`` via your operating system’s package manager. For Debian-like GNU/Linux distributions this would be: :: - apt-get install python3-pygit2 + apt-get install python3-pygit2 Note that simply installing ``pygit2`` via ``pip`` does not work as this omits the ``libgit2`` dependency. @@ -90,7 +95,7 @@ :: - pip3 install --user fsfe-reuse + pip3 install --user fsfe-reuse After this, make sure that ``~/.local/bin`` is in your ``$PATH``. @@ -102,14 +107,15 @@ - Include the texts of all used licenses in your project. - - A special note on the GPL: If you use - ``Valid-License-Identifier: GPL-3.0`` or name the file - ``LICENSES/GPL-3.0.txt``, this will catch all the following licenses: - ``GPL-3.0``, ``GPL-3.0+``, ``GPL-3.0-only`` and ``GPL-3.0-or-later``. - This applies to the entire GPL family of licenses. + - A special note on the GPL: If you use + ``Valid-License-Identifier: GPL-3.0`` or name the file + ``LICENSES/GPL-3.0.txt``, this will catch all the following + licenses: ``GPL-3.0``, ``GPL-3.0+``, ``GPL-3.0-only`` and + ``GPL-3.0-or-later``. This applies to the entire GPL family of + licenses. - Add a comment header to each file that says - ``SPDX-License-Identifier: GPL-3.0-or-later``. Replace + ``SPDX-License-Identifier: GPL-3.0-or-later``. Replace ``GPL-3.0-or-later`` with the license that applies to the file. If you cannot edit the comment header, include a `debian/copyright <https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/>`__ @@ -127,12 +133,12 @@ :: - ~/Projects/curl$ reuse lint - .gitattributes - README - docs/libcurl/CMakeLists.txt - lib/.gitattributes - [...] + ~/Projects/curl$ reuse lint + .gitattributes + README + docs/libcurl/CMakeLists.txt + lib/.gitattributes + [...] All the listed files have no licence information associated with them. @@ -140,18 +146,18 @@ :: - ~/Projects/curll$ reuse compile - SPDXVersion: SPDX-2.1 - DataLicense: CC0-1.0 - SPDXID: SPDXRef-DOCUMENT - DocumentName: curl - DocumentNamespace: http://spdx.org/spdxdocs/spdx-v2.1-c8c7047c-855c-45a6-bed0-c23900498a79 - Creator: Person: Anonymous () - Creator: Organization: Anonymous () - Creator: Tool: reuse-0.0.4 - Created: 2017-11-15T11:42:28Z - CreatorComment: <text>This document was created automatically using available reuse information consistent with the REUSE Initiative.</text> - [...] + ~/Projects/curll$ reuse compile + SPDXVersion: SPDX-2.1 + DataLicense: CC0-1.0 + SPDXID: SPDXRef-DOCUMENT + DocumentName: curl + DocumentNamespace: http://spdx.org/spdxdocs/spdx-v2.1-c8c7047c-855c-45a6-bed0-c23900498a79 + Creator: Person: Anonymous () + Creator: Organization: Anonymous () + Creator: Tool: reuse-0.0.4 + Created: 2017-11-15T11:42:28Z + CreatorComment: <text>This document was created automatically using available reuse information consistent with the REUSE Initiative.</text> + [...] Ideally, you would distribute this bill of materials together with the tarfile distribution of your project. @@ -180,11 +186,11 @@ :: - git clone [email protected]:reuse/reuse.git - cd reuse/ - python3 -mvenv venv - source venv/bin/activate - make develop + git clone [email protected]:reuse/reuse.git + cd reuse/ + python3 -mvenv venv + source venv/bin/activate + make develop You need to run ``make develop`` at least once to set up the virtualenv. @@ -197,19 +203,6 @@ Licensed under the GNU General Public License version 3 or later. - .. |license| image:: https://img.shields.io/pypi/l/fsfe-reuse.svg - :target: https://www.gnu.org/licenses/gpl-3.0.html - .. |version| image:: https://img.shields.io/pypi/v/fsfe-reuse.svg - :target: https://pypi.python.org/pypi/fsfe-reuse - .. |python| image:: https://img.shields.io/pypi/pyversions/fsfe-reuse.svg - :target: https://pypi.python.org/pypi/fsfe-reuse - .. |reuse| image:: https://reuse.software/badge/reuse-compliant.svg - :target: https://reuse.software/ - .. |standard-readme| image:: https://img.shields.io/badge/readme_style-standard-brightgreen.svg - :target: https://github.com/RichardLitt/standard-readme - .. |status| image:: https://img.shields.io/pypi/status/fsfe-reuse.svg - :target: https://pypi.python.org/pypi/fsfe-reuse - Platform: UNKNOWN Classifier: Development Status :: 3 - Alpha Classifier: Intended Audience :: Developers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsfe-reuse-0.3.0/src/reuse/__init__.py new/fsfe-reuse-0.3.1/src/reuse/__init__.py --- old/fsfe-reuse-0.3.0/src/reuse/__init__.py 2018-05-16 14:44:39.000000000 +0200 +++ new/fsfe-reuse-0.3.1/src/reuse/__init__.py 2018-08-14 18:00:58.000000000 +0200 @@ -72,7 +72,7 @@ __author__ = 'Carmen Bianca Bakker' __email__ = '[email protected]' __license__ = 'GPLv3+' -__version__ = '0.3.0' +__version__ = '0.3.1' _logger = logging.getLogger(__name__) # pylint: disable=invalid-name diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsfe-reuse-0.3.0/src/reuse/_util.py new/fsfe-reuse-0.3.1/src/reuse/_util.py --- old/fsfe-reuse-0.3.0/src/reuse/_util.py 2018-01-11 15:20:04.000000000 +0100 +++ new/fsfe-reuse-0.3.1/src/reuse/_util.py 2018-08-14 17:57:41.000000000 +0200 @@ -35,7 +35,7 @@ try: - from pygit2 import Repository, GitError + from pygit2 import GitError, discover_repository GIT_METHOD = 'pygit2' except ImportError: # pragma: no cover if GIT_EXE: @@ -90,8 +90,8 @@ cwd = Path.cwd() if in_git_repo(cwd): if GIT_METHOD == 'pygit2': - repo = Repository(str(cwd)) - return Path(repo.path).parent + repo = discover_repository(str(cwd)) + return Path(repo).parent elif GIT_METHOD == 'git': command = [GIT_EXE, 'rev-parse', '--show-toplevel'] result = execute_command(command, _logger, cwd=str(cwd)) @@ -112,9 +112,9 @@ if GIT_METHOD == 'pygit2': try: - Repository(str(cwd)) + discover_repository(str(cwd)) return True - except GitError: + except KeyError: return False elif GIT_METHOD == 'git': command = [GIT_EXE, 'status'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsfe-reuse-0.3.0/tests/test_reuse.py new/fsfe-reuse-0.3.1/tests/test_reuse.py --- old/fsfe-reuse-0.3.0/tests/test_reuse.py 2018-01-12 13:26:28.000000000 +0100 +++ new/fsfe-reuse-0.3.1/tests/test_reuse.py 2018-08-14 17:57:41.000000000 +0200 @@ -232,8 +232,8 @@ assert not list(project.lint()) -def test_all_licensed_from_different_pwd(fake_repository): - """Same as the other test, but try a different PWD.""" +def test_all_licensed_from_different_cwd(fake_repository): + """Same as the other test, but try a different CWD.""" os.chdir('/') project = reuse.Project(fake_repository) @@ -399,8 +399,8 @@ assert list(project.licenses.keys()) == ['GPL-3.0'] -def test_licenses_from_different_pwd(empty_directory): - """If the PWD is different, still provide correct licenses.""" +def test_licenses_from_different_cwd(empty_directory): + """If the CWD is different, still provide correct licenses.""" os.chdir('/') (empty_directory / 'COPYING').write_text('Valid-License-Identifier: MIT') @@ -453,6 +453,17 @@ assert not list(project.lint()) +@git +def test_find_root_in_git_repo(git_repository): + """When using reuse from a child directory in a Git repo, always find the + root directory. + """ + os.chdir('src') + result = _util.find_root() + + assert Path(result).absolute().resolve() == git_repository + + def test_encoding(): """Given a source code file, correctly detect its encoding and read it.""" tests_directory = Path(__file__).parent.resolve()
