From 89173d2f8e88e9fc735806a237215f50df72e962 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 18 May 2022 11:33:49 +0100 Subject: [PATCH] Improve warning message for _IncludePackageDataAbuse --- setuptools/command/build_py.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 91f4741670..f3d43c561f 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -256,6 +256,7 @@ class _IncludePackageDataAbuse: """Inform users that package or module is included as 'data file'""" MESSAGE = """\ + Installing {importable!r} as data is deprecated, please list it as `package`. !!\n\n ############################ # Package would be ignored # @@ -266,7 +267,9 @@ class _IncludePackageDataAbuse: therefore is considered deprecated). Please make sure that {importable!r} is included as a package by using - setuptools' `packages` configuration field or the proper discovery methods. + setuptools' `packages` configuration field or the proper discovery methods + (for example by using `find_namespace_packages(...)`/`find_namespace:` + instead of `find_packages(...)`/`find:`). You can read more about "package discovery" and "data files" on setuptools documentation page.