diff options
author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2021-11-04 12:30:37 +0000 |
---|---|---|
committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2021-11-04 13:08:16 +0000 |
commit | 08235e88d10179c89ed80a4dd9bf2d18c76b478d (patch) | |
tree | c4c12627695bf38e2d4c87637a70679d094680e3 | |
parent | a5716723c3e311c0a69da57dbf7c5bc65d4ef062 (diff) | |
download | python-setuptools-git-08235e88d10179c89ed80a4dd9bf2d18c76b478d.tar.gz |
Handle custom build_py inheriting from distutils
According to #2849, some projects, including important data-science
packages rely on `distutils` when creating custom commands, instead of
extending the ones provided by setuptools.
This change should accomodate this use case, while also warning the
users to migrate.
-rw-r--r-- | setuptools/command/egg_info.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 4165c35e..8ae27d87 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -618,7 +618,15 @@ class manifest_maker(sdist): Therefore, avoid triggering any attempt of analyzing/building the manifest again. """ - return build_py.get_data_files_without_manifest() + if hasattr(build_py, 'get_data_files_without_manifest'): + return build_py.get_data_files_without_manifest() + + log.warn( + "Custom 'build_py' does not implement " + "'get_data_files_without_manifest'.\nPlease extend command classes" + " from setuptools instead of distutils." + ) + return build_py.get_data_files() def write_file(filename, contents): |