Hello community,

here is the log from the commit of package python-check-manifest for 
openSUSE:Factory checked in at 2020-11-29 12:23:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-check-manifest (Old)
 and      /work/SRC/openSUSE:Factory/.python-check-manifest.new.5913 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-check-manifest"

Sun Nov 29 12:23:59 2020 rev:10 rq:850592 version:0.45

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-check-manifest/python-check-manifest.changes  
    2020-08-25 12:38:49.133415051 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-check-manifest.new.5913/python-check-manifest.changes
    2020-11-29 12:24:13.449747050 +0100
@@ -1,0 +2,23 @@
+Tue Nov 24 15:53:15 UTC 2020 - John Vandenberg <jay...@gmail.com>
+
+- Update to v0.45
+  * Add Python 3.9 support.
+  * Drop Python 3.5 support.
+  * Switch from pep517 to python-build
+  * Add ``--no-build-isolation`` option so check-manifest can
+    succeed building pep517-based distributions without an
+    internet connection.
+    With --no-build-isolation, you must preinstall the
+    ``build-system.requires`` beforehand.
+- from v0.44
+  * Try to avoid passing ``--recurse-submodules`` to ``git ls``
+    if the project doesn't use git submodules (i.e. doesn't
+    have a ``.gitsubmodules`` file)
+    This should make check-manifest work again with older git
+    versions, as long as you don't use submodules
+- from v0.43
+  * Fix collecting files versioned by ``git`` when a project
+    has submodules and ``GIT_INDEX_FILE`` is set. This bug was
+    triggered when ``check-manifest`` was run from a git hook
+
+-------------------------------------------------------------------

Old:
----
  check-manifest-0.42.tar.gz

New:
----
  check-manifest-0.45.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-check-manifest.spec ++++++
--- /var/tmp/diff_new_pack.qcgkFo/_old  2020-11-29 12:24:14.105747714 +0100
+++ /var/tmp/diff_new_pack.qcgkFo/_new  2020-11-29 12:24:14.105747714 +0100
@@ -27,7 +27,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-check-manifest%{psuffix}
-Version:        0.42
+Version:        0.45
 Release:        0
 Summary:        Tool to check Python source package MANIFEST.in for 
completeness
 License:        MIT
@@ -37,19 +37,21 @@
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
+Requires:       python-build
 Requires:       python-pep517
 Requires:       python-setuptools
 Requires:       python-toml
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
+Recommends:     git-core > 2.11
 Recommends:     python-pip
 Recommends:     python-wheel
 Suggests:       bzr
-Suggests:       git-core
 Suggests:       mercurial
 Suggests:       subversion
 BuildArch:      noarch
 %if %{with test}
+BuildRequires:  %{python_module build}
 BuildRequires:  %{python_module mock}
 BuildRequires:  %{python_module pep517}
 BuildRequires:  %{python_module pip}
@@ -57,7 +59,7 @@
 BuildRequires:  %{python_module toml}
 BuildRequires:  %{python_module wheel}
 BuildRequires:  bzr
-BuildRequires:  git-core
+BuildRequires:  git-core > 2.11
 BuildRequires:  mercurial
 BuildRequires:  subversion
 %endif
@@ -86,7 +88,8 @@
 %if %{with test}
 export LANG=en_US.UTF-8
 # test_build_sdist uses pip which likes to use internet to resolve versions
-%pytest -rs -k 'not test_build_sdist'
+# test_python_from_path fails on Leap only
+%pytest -rs -k 'not (test_build_sdist or test_python_from_path)'
 %endif
 
 %if !%{with test}

++++++ check-manifest-0.42.tar.gz -> check-manifest-0.45.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/.travis.yml 
new/check-manifest-0.45/.travis.yml
--- old/check-manifest-0.42/.travis.yml 2020-05-03 14:39:51.000000000 +0200
+++ new/check-manifest-0.45/.travis.yml 2020-10-29 20:16:50.000000000 +0100
@@ -1,10 +1,10 @@
 language: python
 cache: pip
 python:
-    - 3.5
     - 3.6
     - 3.7
     - 3.8
+    - 3.9
     - pypy3
 env:
     - FORCE_TEST_VCS=bzr
@@ -17,7 +17,7 @@
     - pip install -e .[test]
 script:
     - SKIP_NO_TESTS=1 coverage run -m pytest
-    - coverage report -m
+    - coverage report -m --fail-under=$(if [[ $FORCE_TEST_VCS == bzr ]]; then 
printf 99; else printf 100; fi)
     - python check_manifest.py
     - flake8 *.py
 after_script:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/CHANGES.rst 
new/check-manifest-0.45/CHANGES.rst
--- old/check-manifest-0.42/CHANGES.rst 2020-05-03 16:19:37.000000000 +0200
+++ new/check-manifest-0.45/CHANGES.rst 2020-10-30 23:12:25.000000000 +0100
@@ -2,6 +2,45 @@
 =========
 
 
+0.45 (2020-10-31)
+-----------------
+
+- Add Python 3.9 support.
+
+- Drop Python 3.5 support.
+
+- Switch from ``pep517`` to `python-build <https://pypi.org/p/build>`__ (
+  `#128 <https://github.com/mgedmin/check-manifest/pull/128>`__).
+
+- Add ``--no-build-isolation`` option so check-manifest can succeed building
+  pep517-based distributions without an internet connection.  With
+  ``--no-build-isolation``, you must preinstall the ``build-system.requires``
+  beforehand. (
+  `#128 <https://github.com/mgedmin/check-manifest/pull/128>`__).
+
+
+0.44 (2020-10-03)
+-----------------
+
+- Try to avoid passing ``--recurse-submodules`` to ``git ls`` if the project
+  doesn't use git submodules (i.e. doesn't have a ``.gitsubmodules`` file).
+  This should make check-manifest work again with older git versions, as long
+  as you don't use submodules (`#124
+  <https://github.com/mgedmin/check-manifest/issues/124>`__).
+
+
+0.43 (2020-09-21)
+-----------------
+
+- Fix collecting files versioned by ``git`` when a project has submodules and
+  ``GIT_INDEX_FILE`` is set.  This bug was triggered when ``check-manifest``
+  was run as part of a git hook (
+  `#122 <https://github.com/mgedmin/check-manifest/issues/122>`__,
+  `#123 <https://github.com/mgedmin/check-manifest/pull/123>`__).
+
+Note: check-manifest 0.43 requires ``git`` version 2.11 or later.
+
+
 0.42 (2020-05-03)
 -----------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/Makefile 
new/check-manifest-0.45/Makefile
--- old/check-manifest-0.42/Makefile    2020-05-03 16:36:29.000000000 +0200
+++ new/check-manifest-0.45/Makefile    2020-10-29 20:16:49.000000000 +0100
@@ -2,29 +2,33 @@
 all:
        @echo "Nothing to build.  Try 'make test' perhaps?"
 
-.PHONY: check test
-test:
+.PHONY: test
+test:                           ##: run tests
        tox -p auto
-check:
+
+.PHONY: check
+check:                          ##: run tests without skipping any
+# 'make check' is defined in release.mk and here's how you can override it
+define check_recipe =
        SKIP_NO_TESTS=1 tox
+endef
 
 .PHONY: coverage
-coverage:
+coverage:                       ##: measure test coverage
        tox -e coverage
 
 .PHONY: diff-cover
-diff-cover: coverage
+diff-cover: coverage            ##: show untested code in this branch
        coverage xml
        diff-cover coverage.xml
 
 .PHONY: distcheck
 distcheck: distcheck-self  # also release.mk will add other checks
 
-FILE_WITH_VERSION = check_manifest.py
-DISTCHECK_DIFF_OPTS = $(DISTCHECK_DIFF_DEFAULT_OPTS) -x .github
-include release.mk
-
 .PHONY: distcheck-self
 distcheck-self:
-       tox -e py3 --notest
-       .tox/py3/bin/check-manifest
+       tox -e check-manifest
+
+
+FILE_WITH_VERSION = check_manifest.py
+include release.mk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/PKG-INFO 
new/check-manifest-0.45/PKG-INFO
--- old/check-manifest-0.42/PKG-INFO    2020-05-03 16:39:14.341697000 +0200
+++ new/check-manifest-0.45/PKG-INFO    2020-10-30 23:15:11.123818400 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: check-manifest
-Version: 0.42
+Version: 0.45
 Summary: Check MANIFEST.in in a Python source package for completeness
 Home-page: https://github.com/mgedmin/check-manifest
 Author: Marius Gedminas
@@ -147,9 +147,24 @@
                 hooks:
                 -   id: check-manifest
         
+        If you are running pre-commit without a network, you can utilize
+        ``args: [--no-build-isolation]`` to prevent a ``pip install`` reaching 
out to
+        pypi.  If you have additional ``build-system.requires`` outside of pip 
/
+        setuptools / wheel you will want to list those in 
``additional_dependencies``.
         
-        .. |buildstatus| image:: 
https://api.travis-ci.org/mgedmin/check-manifest.svg?branch=master
-        .. _buildstatus: https://travis-ci.org/mgedmin/check-manifest
+        .. code-block:: yaml
+        
+            repos:
+            -   repo: https://github.com/mgedmin/check-manifest
+                rev: ...  # pick a valid tag / revision
+                hooks:
+                -   id: check-manifest
+                    args: [--no-build-isolation]
+                    additional_dependencies: [setuptools-scm]
+        
+        
+        .. |buildstatus| image:: 
https://api.travis-ci.com/mgedmin/check-manifest.svg?branch=master
+        .. _buildstatus: https://travis-ci.com/mgedmin/check-manifest
         
         .. |appveyor| image:: 
https://ci.appveyor.com/api/projects/status/github/mgedmin/check-manifest?branch=master&svg=true
         .. _appveyor: https://ci.appveyor.com/project/mgedmin/check-manifest
@@ -162,6 +177,45 @@
         =========
         
         
+        0.45 (2020-10-31)
+        -----------------
+        
+        - Add Python 3.9 support.
+        
+        - Drop Python 3.5 support.
+        
+        - Switch from ``pep517`` to `python-build 
<https://pypi.org/p/build>`__ (
+          `#128 <https://github.com/mgedmin/check-manifest/pull/128>`__).
+        
+        - Add ``--no-build-isolation`` option so check-manifest can succeed 
building
+          pep517-based distributions without an internet connection.  With
+          ``--no-build-isolation``, you must preinstall the 
``build-system.requires``
+          beforehand. (
+          `#128 <https://github.com/mgedmin/check-manifest/pull/128>`__).
+        
+        
+        0.44 (2020-10-03)
+        -----------------
+        
+        - Try to avoid passing ``--recurse-submodules`` to ``git ls`` if the 
project
+          doesn't use git submodules (i.e. doesn't have a ``.gitsubmodules`` 
file).
+          This should make check-manifest work again with older git versions, 
as long
+          as you don't use submodules (`#124
+          <https://github.com/mgedmin/check-manifest/issues/124>`__).
+        
+        
+        0.43 (2020-09-21)
+        -----------------
+        
+        - Fix collecting files versioned by ``git`` when a project has 
submodules and
+          ``GIT_INDEX_FILE`` is set.  This bug was triggered when 
``check-manifest``
+          was run as part of a git hook (
+          `#122 <https://github.com/mgedmin/check-manifest/issues/122>`__,
+          `#123 <https://github.com/mgedmin/check-manifest/pull/123>`__).
+        
+        Note: check-manifest 0.43 requires ``git`` version 2.11 or later.
+        
+        
         0.42 (2020-05-03)
         -----------------
         
@@ -566,11 +620,12 @@
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
-Requires-Python: >=3.5
+Requires-Python: >=3.6
+Description-Content-Type: text/x-rst
 Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/README.rst 
new/check-manifest-0.45/README.rst
--- old/check-manifest-0.42/README.rst  2019-06-13 14:22:50.000000000 +0200
+++ new/check-manifest-0.45/README.rst  2020-10-30 23:12:11.000000000 +0100
@@ -139,9 +139,24 @@
         hooks:
         -   id: check-manifest
 
+If you are running pre-commit without a network, you can utilize
+``args: [--no-build-isolation]`` to prevent a ``pip install`` reaching out to
+pypi.  If you have additional ``build-system.requires`` outside of pip /
+setuptools / wheel you will want to list those in ``additional_dependencies``.
 
-.. |buildstatus| image:: 
https://api.travis-ci.org/mgedmin/check-manifest.svg?branch=master
-.. _buildstatus: https://travis-ci.org/mgedmin/check-manifest
+.. code-block:: yaml
+
+    repos:
+    -   repo: https://github.com/mgedmin/check-manifest
+        rev: ...  # pick a valid tag / revision
+        hooks:
+        -   id: check-manifest
+            args: [--no-build-isolation]
+            additional_dependencies: [setuptools-scm]
+
+
+.. |buildstatus| image:: 
https://api.travis-ci.com/mgedmin/check-manifest.svg?branch=master
+.. _buildstatus: https://travis-ci.com/mgedmin/check-manifest
 
 .. |appveyor| image:: 
https://ci.appveyor.com/api/projects/status/github/mgedmin/check-manifest?branch=master&svg=true
 .. _appveyor: https://ci.appveyor.com/project/mgedmin/check-manifest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/appveyor.yml 
new/check-manifest-0.45/appveyor.yml
--- old/check-manifest-0.42/appveyor.yml        2020-05-03 14:39:51.000000000 
+0200
+++ new/check-manifest-0.45/appveyor.yml        2020-10-29 20:16:49.000000000 
+0100
@@ -4,10 +4,10 @@
   matrix:
     # https://www.appveyor.com/docs/installed-software#python lists available
     # versions
-    - PYTHON: "C:\\Python35"
     - PYTHON: "C:\\Python36"
     - PYTHON: "C:\\Python37"
     - PYTHON: "C:\\Python38"
+    - PYTHON: "C:\\Python39"
 
 init:
   - "echo %PYTHON%"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/check_manifest.egg-info/PKG-INFO 
new/check-manifest-0.45/check_manifest.egg-info/PKG-INFO
--- old/check-manifest-0.42/check_manifest.egg-info/PKG-INFO    2020-05-03 
16:39:14.000000000 +0200
+++ new/check-manifest-0.45/check_manifest.egg-info/PKG-INFO    2020-10-30 
23:15:11.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: check-manifest
-Version: 0.42
+Version: 0.45
 Summary: Check MANIFEST.in in a Python source package for completeness
 Home-page: https://github.com/mgedmin/check-manifest
 Author: Marius Gedminas
@@ -147,9 +147,24 @@
                 hooks:
                 -   id: check-manifest
         
+        If you are running pre-commit without a network, you can utilize
+        ``args: [--no-build-isolation]`` to prevent a ``pip install`` reaching 
out to
+        pypi.  If you have additional ``build-system.requires`` outside of pip 
/
+        setuptools / wheel you will want to list those in 
``additional_dependencies``.
         
-        .. |buildstatus| image:: 
https://api.travis-ci.org/mgedmin/check-manifest.svg?branch=master
-        .. _buildstatus: https://travis-ci.org/mgedmin/check-manifest
+        .. code-block:: yaml
+        
+            repos:
+            -   repo: https://github.com/mgedmin/check-manifest
+                rev: ...  # pick a valid tag / revision
+                hooks:
+                -   id: check-manifest
+                    args: [--no-build-isolation]
+                    additional_dependencies: [setuptools-scm]
+        
+        
+        .. |buildstatus| image:: 
https://api.travis-ci.com/mgedmin/check-manifest.svg?branch=master
+        .. _buildstatus: https://travis-ci.com/mgedmin/check-manifest
         
         .. |appveyor| image:: 
https://ci.appveyor.com/api/projects/status/github/mgedmin/check-manifest?branch=master&svg=true
         .. _appveyor: https://ci.appveyor.com/project/mgedmin/check-manifest
@@ -162,6 +177,45 @@
         =========
         
         
+        0.45 (2020-10-31)
+        -----------------
+        
+        - Add Python 3.9 support.
+        
+        - Drop Python 3.5 support.
+        
+        - Switch from ``pep517`` to `python-build 
<https://pypi.org/p/build>`__ (
+          `#128 <https://github.com/mgedmin/check-manifest/pull/128>`__).
+        
+        - Add ``--no-build-isolation`` option so check-manifest can succeed 
building
+          pep517-based distributions without an internet connection.  With
+          ``--no-build-isolation``, you must preinstall the 
``build-system.requires``
+          beforehand. (
+          `#128 <https://github.com/mgedmin/check-manifest/pull/128>`__).
+        
+        
+        0.44 (2020-10-03)
+        -----------------
+        
+        - Try to avoid passing ``--recurse-submodules`` to ``git ls`` if the 
project
+          doesn't use git submodules (i.e. doesn't have a ``.gitsubmodules`` 
file).
+          This should make check-manifest work again with older git versions, 
as long
+          as you don't use submodules (`#124
+          <https://github.com/mgedmin/check-manifest/issues/124>`__).
+        
+        
+        0.43 (2020-09-21)
+        -----------------
+        
+        - Fix collecting files versioned by ``git`` when a project has 
submodules and
+          ``GIT_INDEX_FILE`` is set.  This bug was triggered when 
``check-manifest``
+          was run as part of a git hook (
+          `#122 <https://github.com/mgedmin/check-manifest/issues/122>`__,
+          `#123 <https://github.com/mgedmin/check-manifest/pull/123>`__).
+        
+        Note: check-manifest 0.43 requires ``git`` version 2.11 or later.
+        
+        
         0.42 (2020-05-03)
         -----------------
         
@@ -566,11 +620,12 @@
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
-Requires-Python: >=3.5
+Requires-Python: >=3.6
+Description-Content-Type: text/x-rst
 Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/check-manifest-0.42/check_manifest.egg-info/requires.txt 
new/check-manifest-0.45/check_manifest.egg-info/requires.txt
--- old/check-manifest-0.42/check_manifest.egg-info/requires.txt        
2020-05-03 16:39:14.000000000 +0200
+++ new/check-manifest-0.45/check_manifest.egg-info/requires.txt        
2020-10-30 23:15:11.000000000 +0100
@@ -1,4 +1,4 @@
-pep517
+build>=0.1
 setuptools
 toml
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/check_manifest.py 
new/check-manifest-0.45/check_manifest.py
--- old/check-manifest-0.42/check_manifest.py   2020-05-03 16:19:37.000000000 
+0200
+++ new/check-manifest-0.45/check_manifest.py   2020-10-30 23:12:25.000000000 
+0100
@@ -30,15 +30,18 @@
 import tempfile
 import unicodedata
 import zipfile
-from contextlib import contextmanager, closing
-from distutils.text_file import TextFile
+from contextlib import closing, contextmanager
+from typing import List, Optional, Union
 from xml.etree import ElementTree as ET
 
 import toml
 from setuptools.command.egg_info import translate_pattern
 
+# import distutils after setuptools to avoid a warning
+from distutils.text_file import TextFile
+
 
-__version__ = '0.42'
+__version__ = '0.45'
 __author__ = 'Marius Gedminas <mar...@gedmin.as>'
 __licence__ = 'MIT'
 __url__ = 'https://github.com/mgedmin/check-manifest'
@@ -127,35 +130,39 @@
 #
 
 class CommandFailed(Failure):
-    def __init__(self, command, status, output):
-        Failure.__init__(self, "%s failed (status %s):\n%s" % (
+    def __init__(self, command: List[str], status: int, output: str) -> None:
+        super().__init__("%s failed (status %s):\n%s" % (
                                command, status, output))
 
 
-def run(command, encoding=None, decode=True, cwd=None):
+def run(
+    command: List[str],
+    *,
+    encoding: Optional[str] = None,
+    decode: bool = True,
+    cwd: Optional[str] = None  # Python 3.5 forbids trailing comma here!
+) -> Union[str, bytes]:
     """Run a command [cmd, arg1, arg2, ...].
 
-    Returns the output (stdout + stderr).
+    Returns the output (stdout only).
 
     Raises CommandFailed in cases of error.
     """
     if not encoding:
         encoding = locale.getpreferredencoding()
     try:
-        # Python 2.7 doesn't have subprocess.DEVNULL
-        with open(os.devnull, 'rb') as devnull:
-            pipe = subprocess.Popen(command, stdin=devnull,
-                                    stdout=subprocess.PIPE,
-                                    stderr=subprocess.PIPE, cwd=cwd)
+        pipe = subprocess.Popen(command, stdin=subprocess.DEVNULL,
+                                stdout=subprocess.PIPE,
+                                stderr=subprocess.PIPE, cwd=cwd)
     except OSError as e:
         raise Failure("could not run %s: %s" % (command, e))
     output, stderr = pipe.communicate()
-    if decode:
-        output = output.decode(encoding)
-    stderr = stderr.decode(encoding, 'replace')
     status = pipe.wait()
     if status != 0:
-        raise CommandFailed(command, status, output + stderr)
+        raise CommandFailed(command, status,
+                            (output + stderr).decode(encoding, 'replace'))
+    if decode:
+        return output.decode(encoding)
     return output
 
 
@@ -311,6 +318,7 @@
             filelist = zf.namelist()
     elif archive_filename.endswith(('.tar.gz', '.tar.bz2', '.tar')):
         with closing(tarfile.open(archive_filename)) as tf:
+            # XXX: is unicodify() necessary now that Py2 is no longer 
supported?
             filelist = map(unicodify, tf.getnames())
     else:
         raise Failure('Unrecognized archive type: %s'
@@ -361,16 +369,6 @@
     return [name[len(prefix):] for name in names if name != prefix]
 
 
-def add_prefix_to_each(prefix, filelist):
-    """Add a prefix to each name in a file list.
-
-        >>> add_prefix_to_each('foo/bar', ['a', 'b', 'c/d'])
-        ['foo/bar/a', 'foo/bar/b', 'foo/bar/c/d']
-
-    """
-    return [posixpath.join(prefix, name) for name in filelist]
-
-
 class VCS:
 
     def __init__(self, ui):
@@ -396,35 +394,20 @@
         # .git can be a file for submodules
         return os.path.exists(os.path.join(location, cls.metadata_name))
 
+    def _has_submodules(cls):
+        return os.path.exists(".gitmodules")
+
     def get_versioned_files(self):
         """List all files versioned by git in the current directory."""
-        files = self._git_ls_files()
-        submodules = self._list_submodules()
-        for subdir in submodules:
-            subdir = os.path.relpath(subdir).replace(os.path.sep, '/')
-            files += add_prefix_to_each(subdir, self._git_ls_files(subdir))
-        return files
-
-    @classmethod
-    def _git_ls_files(cls, cwd=None):
-        output = run(['git', 'ls-files', '-z'], encoding=cls._encoding, 
cwd=cwd)
+        extra_args = ["--recurse-submodules"] if self._has_submodules() else []
+        output = run(
+            ["git", "ls-files", "-z"] + extra_args,
+            encoding=self._encoding,
+        )
         # -z tells git to use \0 as a line terminator; split() treats it as a
         # line separator, so we always get one empty line at the end, which we
         # drop with the [:-1] slice
-        return output.split('\0')[:-1]
-
-    @classmethod
-    def _list_submodules(cls):
-        # This is incredibly expensive on my Jenkins instance (50 seconds for
-        # each invocation, even when there are no submodules whatsoever).
-        # Curiously, I cannot reproduce that in Appveyor, or even on the same
-        # Jenkins machine but when I run the tests manually.  Still, 2-hour
-        # Jenkins runs are bad, so let's avoid running 'git submodule' when
-        # there's no .gitmodules file.
-        if not os.path.exists('.gitmodules'):
-            return []
-        return run(['git', 'submodule', '--quiet', 'foreach', '--recursive',
-                    'printf "%s/%s\\n" $toplevel $path'], 
encoding=cls._encoding).splitlines()
+        return output.split("\0")[:-1]
 
 
 class Mercurial(VCS):
@@ -914,7 +897,7 @@
     return True
 
 
-def build_sdist(tempdir, python=sys.executable):
+def build_sdist(tempdir, python=sys.executable, build_isolation=True):
     """Build a source distribution in a temporary directory.
 
     Should be run with the current working directory inside the Python package
@@ -922,18 +905,22 @@
     """
     if should_use_pep_517():
         # I could do this in-process with
-        #   import pep517.envbuild
-        #   pep517.envbuild.build_sdist('.', tempdir)
+        #   import build.__main__
+        #   build.__main__.build('.', tempdir)
         # but then it would print a bunch of things to stdout and I'd have to
         # worry about exceptions
-        run([python, '-m', 'pep517.build', '--source', '-o', tempdir, '.'])
+        cmd = [python, '-m', 'build', '--sdist', '.', '--outdir', tempdir]
+        if not build_isolation:
+            cmd.append('--no-isolation')
+        run(cmd)
     else:
         run([python, 'setup.py', 'sdist', '-d', tempdir])
 
 
 def check_manifest(source_tree='.', create=False, update=False,
                    python=sys.executable, ui=None, extra_ignore=None,
-                   extra_ignore_bad_ideas=None):
+                   extra_ignore_bad_ideas=None,
+                   build_isolation=True):
     """Compare a generated source distribution with list of files in a VCS.
 
     Returns True if the manifest is fine.
@@ -961,7 +948,7 @@
             raise Failure('There are no files added to version control!')
         ui.info_begin("building an sdist")
         with mkdtemp('-sdist') as tempdir:
-            build_sdist(tempdir, python=python)
+            build_sdist(tempdir, python=python, 
build_isolation=build_isolation)
             sdist_filename = get_one_file_in(tempdir)
             ui.info_continue(": %s" % os.path.basename(sdist_filename))
             sdist_files = get_sdist_file_list(sdist_filename, ignore)
@@ -987,7 +974,7 @@
             with cd(tempsourcedir):
                 with mkdtemp('-sdist') as tempdir:
                     os.environ['SETUPTOOLS_SCM_PRETEND_VERSION'] = version
-                    build_sdist(tempdir, python=python)
+                    build_sdist(tempdir, python=python, 
build_isolation=build_isolation)
                     sdist_filename = get_one_file_in(tempdir)
                     ui.info_continue(": %s" % os.path.basename(sdist_filename))
                     clean_sdist_files = get_sdist_file_list(sdist_filename, 
ignore)
@@ -1017,7 +1004,7 @@
                             ui.info("creating MANIFEST.in")
                         else:
                             ui.info("updating MANIFEST.in")
-                            f.write('\n# added by check_manifest.py\n')
+                            f.write('\n# added by check-manifest\n')
                         f.write('\n'.join(suggestions) + '\n')
                     if unknowns:
                         ui.info("don't know how to come up with rules 
matching\n%s"
@@ -1067,6 +1054,12 @@
     parser.add_argument('--ignore-bad-ideas', metavar='patterns',
                         default=[], help='ignore bad idea files/directories '
                         'matching these comma-separated patterns')
+    parser.add_argument(
+        '--no-build-isolation', dest='build_isolation', action='store_false',
+        help='Disable isolation when building a modern source distribution. '
+        'Build dependencies specified by PEP 518 must be already installed if '
+        'this option is used.',
+    )
     args = parser.parse_args()
 
     ignore = IgnoreList()
@@ -1083,7 +1076,8 @@
         if not check_manifest(args.source_tree, create=args.create,
                               update=args.update, python=args.python,
                               ui=ui, extra_ignore=ignore,
-                              extra_ignore_bad_ideas=ignore_bad_ideas):
+                              extra_ignore_bad_ideas=ignore_bad_ideas,
+                              build_isolation=args.build_isolation):
             sys.exit(1)
     except Failure as e:
         ui.error(str(e))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/release.mk 
new/check-manifest-0.45/release.mk
--- old/check-manifest-0.42/release.mk  2020-05-03 16:35:40.000000000 +0200
+++ new/check-manifest-0.45/release.mk  2020-10-29 20:16:49.000000000 +0100
@@ -1,4 +1,4 @@
-# release.mk version 1.5 (2020-05-03)
+# release.mk version 2.0 (2020-10-11)
 #
 # Helpful Makefile rules for releasing Python packages.
 # https://github.com/mgedmin/python-project-skel
@@ -14,7 +14,7 @@
 PYTHON ?= python3
 PYPI_PUBLISH ?= rm -rf dist && $(PYTHON) setup.py -q sdist bdist_wheel && 
twine check dist/* && twine upload dist/*
 LATEST_RELEASE_MK_URL = 
https://raw.githubusercontent.com/mgedmin/python-project-skel/master/release.mk
-DISTCHECK_DIFF_DEFAULT_OPTS = -x PKG-INFO -x setup.cfg -x '*.egg-info' -I'^\#'
+DISTCHECK_DIFF_DEFAULT_OPTS = -x PKG-INFO -x setup.cfg -x '*.egg-info' -x 
.github -I'^\#'
 
 # These should be fine, as long as you use Git
 VCS_GET_LATEST ?= git pull
@@ -27,30 +27,58 @@
 changelog_ver = `$(PYTHON) setup.py --version`
 changelog_date = `LC_ALL=C date +'$(CHANGELOG_DATE_FORMAT)'`
 
+# Tweaking the look of 'make help'; most of these are awk literals and need 
the quotes
+HELP_INDENT = ""
+HELP_PREFIX = "make "
+HELP_WIDTH = 24
+HELP_SEPARATOR = " \# "
+HELP_SECTION_SEP = "\n"
+
+.PHONY: help
+help:
+       @grep -Eh -e '^[a-zA-Z0-9_ -]+:.*?##: .*$$' -e '^##:' $(MAKEFILE_LIST) \
+           | awk 'BEGIN {FS = "(^|:[^#]*)##: "; section=""}; \
+                 /^##:/ {printf "%s%s\n%s", section, $$2, $(HELP_SECTION_SEP); 
section=$(HELP_SECTION_SEP)} \
+                 /^[^#]/ {printf "%s\033[36m%-$(HELP_WIDTH)s\033[0m%s%s\n", \
+                          $(HELP_INDENT), $(HELP_PREFIX) $$1, 
$(HELP_SEPARATOR), $$2}'
 
 .PHONY: dist
 dist:
        $(PYTHON) setup.py -q sdist bdist_wheel
 
+# Provide a default 'make check' to be the same as 'make test', since that's
+# what 80% of my projects use, but make it possible to override.  Now
+# overriding Make rules is painful, so instead of a regular rule definition
+# you'll have to override the check_recipe macro.
+.PHONY: check
+check:
+       $(check_recipe)
+
+ifndef check_recipe
+define check_recipe =
+       @$(MAKE) test
+endef
+endif
+
 .PHONY: distcheck
 distcheck: distcheck-vcs distcheck-sdist
 
 .PHONY: distcheck-vcs
 distcheck-vcs:
+ifndef FORCE
        # Bit of a chicken-and-egg here, but if the tree is unclean, make
        # distcheck-sdist will fail.
-ifndef FORCE
        @test -z "`$(VCS_STATUS) 2>&1`" || { echo; echo "Your working tree is 
not clean:" 1>&2; $(VCS_STATUS) 1>&2; exit 1; }
 endif
 
-# NB: do not use $(MAKE) because then make -n distcheck will actually run
-# it instead of just printing what it does
+# NB: do not use $(MAKE) in rules with multiple shell commands joined by &&
+# because then make -n distcheck will actually run those instead of just
+# printing what it does
 
 # TBH this could (and probably should) be replaced by check-manifest
 
 .PHONY: distcheck-sdist
-distcheck-sdist:
-       $(MAKE) dist
+distcheck-sdist: dist
        pkg_and_version=`$(PYTHON) setup.py --name`-`$(PYTHON) setup.py 
--version` && \
          rm -rf tmp && \
          mkdir tmp && \
@@ -97,20 +125,24 @@
            grep -q "^$$ver_and_date$$" $(FILE_WITH_CHANGELOG) || { \
                echo "$(FILE_WITH_CHANGELOG) has no entry for $$ver_and_date"; 
exit 1; }
 
-# NB: do not use $(MAKE) because then make -n releasechecklist will
-# actually run the distcheck instead of just printing what it does
+
+# NB: the Makefile that includes release.mk may want to add additional
+# dependencies to the releasechecklist target, but I want 'make distcheck' to
+# happen last, so that's why I put it into the recipe and not at the end of the
+# list of dependencies.
 
 .PHONY: releasechecklist
 releasechecklist: check-latest-rules check-latest-version check-version-number 
check-long-description check-changelog
        $(MAKE) distcheck
 
 .PHONY: release
-release: releasechecklist do-release
+release: releasechecklist do-release    ##: prepare a new PyPI release
 
 .PHONY: do-release
 do-release:
        $(release_recipe)
 
+ifndef release_recipe
 define release_recipe =
        # I'm chicken so I won't actually do these things yet
        @echo "Please run"
@@ -124,3 +156,4 @@
        @echo '  $(VCS_COMMIT_AND_PUSH)'
        @echo
 endef
+endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/setup.cfg 
new/check-manifest-0.45/setup.cfg
--- old/check-manifest-0.42/setup.cfg   2020-05-03 16:39:14.341697000 +0200
+++ new/check-manifest-0.45/setup.cfg   2020-10-30 23:15:11.123818400 +0100
@@ -16,6 +16,20 @@
 [flake8]
 ignore = E241,E501,E261,E126,E127,E128,E302,W503
 
+[mypy-setuptools.command.egg_info]
+ignore_missing_imports = true
+
+[mypy-zest.releaser.utils]
+ignore_missing_imports = true
+
+[isort]
+multi_line_output = 3
+include_trailing_comma = true
+lines_after_imports = 2
+reverse_relative = true
+default_section = THIRDPARTY
+known_first_party = check_manifest
+
 [egg_info]
 tag_build = 
 tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/setup.py 
new/check-manifest-0.45/setup.py
--- old/check-manifest-0.42/setup.py    2020-05-03 15:34:52.000000000 +0200
+++ new/check-manifest-0.45/setup.py    2020-10-30 23:12:11.000000000 +0100
@@ -33,6 +33,7 @@
     url=url,
     description='Check MANIFEST.in in a Python source package for 
completeness',
     long_description=long_description,
+    long_description_content_type='text/x-rst',
     keywords=['distutils', 'setuptools', 'packaging', 'manifest', 'checker',
               'linter'],
     classifiers=[
@@ -43,10 +44,10 @@
         'Operating System :: OS Independent',
         'Programming Language :: Python',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
         'Programming Language :: Python :: 3.8',
+        'Programming Language :: Python :: 3.9',
         'Programming Language :: Python :: Implementation :: CPython',
         'Programming Language :: Python :: Implementation :: PyPy',
     ],
@@ -54,9 +55,9 @@
 
     py_modules=['check_manifest'],
     zip_safe=False,
-    python_requires=">=3.5",
+    python_requires=">=3.6",
     install_requires=[
-        'pep517',
+        'build>=0.1',
         'setuptools',
         'toml',
     ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/tests.py 
new/check-manifest-0.45/tests.py
--- old/check-manifest-0.42/tests.py    2020-05-03 15:33:28.000000000 +0200
+++ new/check-manifest-0.45/tests.py    2020-10-30 23:12:11.000000000 +0100
@@ -16,6 +16,7 @@
 from contextlib import closing
 from functools import partial
 from io import BytesIO, StringIO
+from typing import Optional
 from xml.etree import ElementTree as ET
 
 import mock
@@ -197,7 +198,7 @@
 
     def test_unicodify(self):
         from check_manifest import unicodify
-        nonascii = b'\xc3\xa9.txt'.decode('UTF-8') # because Py3.2 lacks u''
+        nonascii = "\u00E9.txt"
         self.assertEqual(unicodify(nonascii), nonascii)
         self.assertEqual(
             unicodify(nonascii.encode(locale.getpreferredencoding())),
@@ -220,7 +221,7 @@
     def test_get_archive_file_list_zip_nonascii(self):
         from check_manifest import get_archive_file_list
         filename = os.path.join(self.make_temp_dir(), 'archive.zip')
-        nonascii = b'\xc3\xa9.txt'.decode('UTF-8') # because Py3.2 lacks u''
+        nonascii = "\u00E9.txt"
         self.create_zip_file(filename, [nonascii])
         self.assertEqual(get_archive_file_list(filename),
                          [nonascii])
@@ -235,7 +236,7 @@
     def test_get_archive_file_list_tar_nonascii(self):
         from check_manifest import get_archive_file_list
         filename = os.path.join(self.make_temp_dir(), 'archive.tar')
-        nonascii = b'\xc3\xa9.txt'.decode('UTF-8') # because Py3.2 lacks u''
+        nonascii = "\u00E9.txt"
         self.create_tar_file(filename, [nonascii])
         self.assertEqual(get_archive_file_list(filename),
                          [nonascii])
@@ -605,7 +606,7 @@
         with cd(src_dir):
             self.assertTrue(should_use_pep_517())
 
-    def test_build_sdist(self):
+    def _test_build_sdist_pep517(self, build_isolation):
         from check_manifest import build_sdist, cd, get_one_file_in
         src_dir = self.make_temp_dir()
         filename = os.path.join(src_dir, 'pyproject.toml')
@@ -620,9 +621,15 @@
         out_dir = self.make_temp_dir()
         python = os.path.abspath(sys.executable)
         with cd(src_dir):
-            build_sdist(out_dir, python=python)
+            build_sdist(out_dir, python=python, 
build_isolation=build_isolation)
         self.assertTrue(get_one_file_in(out_dir))
 
+    def test_build_sdist_pep517_isolated(self):
+        self._test_build_sdist_pep517(build_isolation=True)
+
+    def test_build_sdist_pep517_no_isolation(self):
+        self._test_build_sdist_pep517(build_isolation=False)
+
 
 class TestConfiguration(unittest.TestCase):
 
@@ -908,7 +915,8 @@
 
 class VCSHelper(object):
 
-    command = None  # override in subclasses
+    # override in subclasses
+    command = None  # type: Optional[str]
 
     def is_installed(self):
         try:
@@ -1019,8 +1027,7 @@
         # "eacute".  UTF-8 or Latin-1 should work.
         from check_manifest import get_vcs_files
         self._init_vcs()
-        # A spelling of u"\xe9.txt" that works on Python 3.2 too
-        filename = b'\xc3\xa9.txt'.decode('UTF-8')
+        filename = "\u00E9.txt"
         self._create_and_add_to_vcs([filename])
         self.assertEqual(get_vcs_files(self.ui), [filename])
 
@@ -1101,6 +1108,10 @@
                 'subdir/sub2/sub3/file4',
             ])
 
+    def 
test_get_versioned_files_with_git_submodules_with_git_index_file_set(self):
+        with mock.patch.dict(os.environ, {"GIT_INDEX_FILE": ".git/index"}):
+            self.test_get_versioned_files_with_git_submodules()
+
 
 class BzrHelper(VCSHelper):
 
@@ -1675,7 +1686,7 @@
         with open('MANIFEST.in') as f:
             self.assertEqual(
                 f.read(),
-                "#tbd\n# added by check_manifest.py\ninclude *.txt\n")
+                "#tbd\n# added by check-manifest\ninclude *.txt\n")
 
     def test_suggestions_all_unknown_patterns(self):
         from check_manifest import check_manifest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.42/tox.ini 
new/check-manifest-0.45/tox.ini
--- old/check-manifest-0.42/tox.ini     2020-05-03 14:39:51.000000000 +0200
+++ new/check-manifest-0.45/tox.ini     2020-10-29 20:16:49.000000000 +0100
@@ -1,6 +1,6 @@
 [tox]
 envlist =
-    py35,py36,py37,py38,pypy3,flake8
+    py36,py37,py38,py39,pypy3,flake8
 
 [testenv]
 passenv = LANG LC_CTYPE LC_ALL MSYSTEM
@@ -24,7 +24,20 @@
     nosetests {posargs}
 
 
+[testenv:check-manifest]
+basepython = python3
+deps =
+extras =
+commands = check-manifest {posargs}
+
 [testenv:flake8]
+basepython = python3
 skip_install = true
 deps = flake8
-commands = flake8 *.py
+commands = flake8 {posargs:check_manifest.py setup.py tests.py}
+
+[testenv:mypy]
+basepython = python3
+skip_install = true
+deps = mypy
+commands = mypy {posargs:check_manifest.py}
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to