[tool.setuptools.packages.find]
where = ["."]
exclude = [
# Additional ecludsion from Setuptools default.
"htmlcov",
# Setuptools default.
# see:
# - setuptools/discovery.py at 92ebeed732b08ac29576634ad4814b9efd07bb37 · pypa/setuptools
# https://github.com/pypa/setuptools/blob/92ebeed732b08ac29576634ad4814b9efd07bb37/setuptools/discovery.py
# FlatLayoutPackageFinder
"ci",
"ci.*",
"bin",
"bin.*",
"doc",
"doc.*",
"docs",
"docs.*",
"documentation",
"documentation.*",
"manpages",
"manpages.*",
"news",
"news.*",
"changelog",
"changelog.*",
"test",
"test.*",
"tests",
"tests.*",
"unit_test",
"unit_test.*",
"unit_tests",
"unit_tests.*",
"example",
"example.*",
"examples",
"examples.*",
"scripts",
"scripts.*",
"tools",
"tools.*",
"util",
"util.*",
"utils",
"utils.*",
"python",
"python.*",
"build",
"build.*",
"dist",
"dist.*",
"venv",
"venv.*",
"env",
"env.*",
"requirements",
"requirements.*",
# ---- Task runners / Build tools ----
"tasks", # invoke
"tasks.*", # invoke
"fabfile", # fabric
"fabfile.*", # fabric
"site_scons", # SCons
"site_scons.*", # SCons
# ---- Other tools ----
"benchmark",
"benchmark.*",
"benchmarks",
"benchmarks.*",
"exercise",
"exercise.*",
"exercises",
"exercises.*",
# ---- Hidden directories/Private packages ----
"[._]*",
# FlatLayoutModuleFinder
"setup",
"setup.*",
"conftest",
"conftest.*",
"test",
"test.*",
"tests",
"tests.*",
"example",
"example.*",
"examples",
"examples.*",
"build",
"build.*",
# ---- Task runners ----
"toxfile",
"toxfile.*",
"noxfile",
"noxfile.*",
"pavement",
"pavement.*",
"dodo",
"dodo.*",
"tasks",
"tasks.*",
"fabfile",
"fabfile.*",
# ---- Other tools ----
"[Ss][Cc]onstruct", # SCons
"[Ss][Cc]onstruct.*", # SCons
"conanfile", # Connan: C/C++ build tool
"conanfile.*", # Connan: C/C++ build tool
"manage", # Django
"manage.*", # Django
"benchmark",
"benchmark.*",
"benchmarks",
"benchmarks.*",
"exercise",
"exercise.*",
"exercises",
"exercises.*",
# ---- Hidden files/Private modules ----
"[._]*",
]
What's the problem this feature will solve?
Setuptools users become able to omit redundant definition when they want to add exclude directory or file in
flat-layout.And they also become able to manage many packages because they can reduce toils of maintain
pyproject.tomlin each project.pyproject.toml when exclude as same as DEFAULT_EXCLUDE by tool.setuptools.packages.find.exclude
cf. Package Discovery and Namespace Packages - setuptools 65.3.0.post20220826 documentation
Describe the solution you'd like
For example, adds parameter
additional_excludewhich inheritsDEFAULT_EXCLUDE.Alternative Solutions
Alternative Solution A
(If it can) User rename target directory with starting
..Because Setuptools ignore by
DEFAULT_EXCLUDE.However, directory starting with
.behaves as hidden by system.It's intension isn't always same as excluding when build.
Alternative Solution B
Setuptools adds directory to exclude when user report in GitHub Issues.
However, Setuptools shouldn't cover every tools because there are infinite minor tools.
Additional context
In my case, I would to exclude
htmlcovdirectory additionally which is dump of coverage.see: Command line usage — Coverage.py 6.3.2 documentation
Code of Conduct