Skip to content

Commit d1feaa3

Browse files
docs: warn about data_files usage
1 parent ecf32d9 commit d1feaa3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎source/guides/distributing-packages-using-setuptools.rst‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,13 @@ For more information, see :std:doc:`Including Data Files
250250

251251
data_files=[('my_data', ['data/data_file'])],
252252

253+
.. warning::
254+
255+
``data_files`` is a legacy installation mechanism and is deprecated in
256+
setuptools' declarative configuration. Prefer :ref:`Package Data` for files
257+
that belong inside an import package, and reserve ``data_files`` for
258+
last-resort cases that need to place files outside Python packages.
259+
253260
Although configuring :ref:`Package Data` is sufficient for most needs, in some
254261
cases you may need to place data files *outside* of your :term:`packages
255262
<Import Package>`. The ``data_files`` directive allows you to do that.

0 commit comments

Comments
 (0)