diff --git a/CHANGES.rst b/CHANGES.rst index c794e36..50ae609 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -60,8 +60,7 @@ Changelog - 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 `__). + beforehand. (`#128 `__). 0.44 (2020-10-03) diff --git a/README.rst b/README.rst index f2d6620..360d5f5 100644 --- a/README.rst +++ b/README.rst @@ -141,18 +141,18 @@ git-workflow. Add the following to your ``.pre-commit-config.yaml``. 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``. +PyPI. This makes ``python -m build`` ignore your ``build-system.requires``, +so you'll want to list them all in ``additional_dependencies``. .. code-block:: yaml repos: - repo: https://github.com/mgedmin/check-manifest - rev: ... # pick a valid tag / revision + rev: "0.49" hooks: - id: check-manifest args: [--no-build-isolation] - additional_dependencies: [setuptools-scm] + additional_dependencies: [setuptools, wheel, setuptools-scm] .. |buildstatus| image:: https://github.com/mgedmin/check-manifest/workflows/build/badge.svg?branch=master diff --git a/check_manifest.py b/check_manifest.py index f02f793..0766969 100755 --- a/check_manifest.py +++ b/check_manifest.py @@ -1038,34 +1038,51 @@ def check_manifest(source_tree='.', create=False, update=False, def main(): parser = argparse.ArgumentParser( - description="Check a Python MANIFEST.in file for completeness", - formatter_class=argparse.ArgumentDefaultsHelpFormatter) - parser.add_argument('source_tree', default='.', nargs='?', - help='location for the source tree') - parser.add_argument('--version', action='version', - version='%(prog)s version ' + __version__) - parser.add_argument('-q', '--quiet', action='store_const', dest='quiet', - const=0, default=1, help='reduced output verbosity') - parser.add_argument('-v', '--verbose', action='store_const', dest='verbose', - const=1, default=0, help='more verbose output') - parser.add_argument('-c', '--create', action='store_true', - help='create a MANIFEST.in if missing') - parser.add_argument('-u', '--update', action='store_true', + description="Check a Python MANIFEST.in file for completeness") + parser.add_argument( + 'source_tree', default='.', nargs='?', + help='location for the source tree (default: .)') + parser.add_argument( + '--version', action='version', + version='%(prog)s version ' + __version__) + parser.add_argument( + '-q', '--quiet', action='store_const', dest='quiet', + const=0, default=1, help='reduced output verbosity') + parser.add_argument( + '-v', '--verbose', action='store_const', dest='verbose', + const=1, default=0, help='more verbose output') + parser.add_argument( + '-c', '--create', action='store_true', + help='create a MANIFEST.in if missing (default: exit with an error)') + parser.add_argument( + '-u', '--update', action='store_true', help='append suggestions to MANIFEST.in (implies --create)') - parser.add_argument('-p', '--python', default=sys.executable, - help='use this Python interpreter for running setup.py sdist') - parser.add_argument('--ignore', metavar='patterns', default=None, - help='ignore files/directories matching these' - ' comma-separated patterns') - parser.add_argument('--ignore-bad-ideas', metavar='patterns', - default=[], help='ignore bad idea files/directories ' - 'matching these comma-separated patterns') + parser.add_argument( + '-p', '--python', default=sys.executable, + help=( + 'use this Python interpreter for running setup.py sdist' + ' (default: %(default)s)' + )) + parser.add_argument( + '--ignore', metavar='patterns', default=None, + help=( + 'ignore files/directories matching these comma-separated' + ' glob patterns' + )) + parser.add_argument( + '--ignore-bad-ideas', metavar='patterns', default=[], + help=( + 'ignore bad idea files/directories matching these' + ' comma-separated glob 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.', - ) + help=( + 'disable isolation when building a modern source distribution' + ' (default: use build isolation).' + ' Build dependencies specified by pyproject.toml must be already' + ' installed if this option is used.' + )) args = parser.parse_args() ignore = IgnoreList()