From e3197f34ad28f95e91a329ccd1cee132c9b8bdcd Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Sat, 13 Sep 2025 16:18:16 +0100 Subject: [PATCH] Do not use VCS to include files in sdist by default --- flit/__init__.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/flit/__init__.py b/flit/__init__.py index 7b28035a..0d9c42cd 100644 --- a/flit/__init__.py +++ b/flit/__init__.py @@ -103,8 +103,7 @@ def add_shared_build_options(parser: argparse.ArgumentParser): help=("Choose which files to include in the sdist using git or hg. " "This is a convenient way to include all checked-in files, like " "tests and doc source files, in your sdist, but requires that git " - "or hg is available on the command line. This is currently the " - "default, but it will change in a future version. " + "or hg is available on the command line." ) ) @@ -112,7 +111,7 @@ def add_shared_build_options(parser: argparse.ArgumentParser): help=("Select the files to include in the sdist without using git or hg. " "This should include all essential files to install and use your " "package; see the documentation for precisely what is included. " - "This will become the default in a future version." + "This is the default for Flit version 4 and above." ) ) @@ -190,14 +189,11 @@ def gen_setup_py(): return False return args.setup_py - def sdist_use_vcs(): - return not args.no_use_vcs - if args.subcmd == 'build': from .build import main try: main(args.ini_file, formats=set(args.format or []), - gen_setup_py=gen_setup_py(), use_vcs=sdist_use_vcs()) + gen_setup_py=gen_setup_py(), use_vcs=args.use_vcs) except(common.NoDocstringError, common.VCSError, common.NoVersionError) as e: sys.exit(e.args[0]) elif args.subcmd == 'publish': @@ -206,7 +202,7 @@ def sdist_use_vcs(): repository = args.repository or args.deprecated_repository from .upload import main main(args.ini_file, repository, args.pypirc, formats=set(args.format or []), - gen_setup_py=gen_setup_py(), use_vcs=sdist_use_vcs()) + gen_setup_py=gen_setup_py(), use_vcs=args.use_vcs) elif args.subcmd == 'install': from .install import Installer