package_data
By default, include_package_data considers all non .py files found inside the package directory (src/mypkg in this case) as data files, and includes those that satisfy (at least) one of the above two conditions into the source distribution, and consequently in the installation of your package. 「デフォルトでは、include_package_dataは、パッケージディレクトリで見つかった.pyでない全てのファイルをデータファイルとみなす」
「それらのうち上記2つの条件のうち(少なくとも)1つを満たすものをソース配布物に、結果としてあなたのパッケージのインストールに含める」
2つとは、MANIFEST.inとsetuptools_scm(と思われる)
package_dataは、含まれるデータファイルについて、よりきめ細かい制御を提供
例:package_data={"mypkg": ["*.txt", "*.rst"]}
maps from package names to lists of glob patterns.
辞書のキーを空文字列にするとall packagesを表す
Note that the data files specified using the package_data option neither require to be included within a MANIFEST.in file, nor require to be added by a revision control system plugin.
「package_dataオプションを使って指定されたデータファイルは、MANIFEST.inファイルに含められる必要はなく、バージョン管理システムプラグインによって追加される必要もない」
(include_package_dataと違って)package_dataではMANIFEST.inが不要
When building an sdist, the datafiles are also drawn from the package_name.egg-info/SOURCES.txt file, so make sure that this is removed if the setup.py package_data list is updated before calling setup.py.
「sdistをビルドするとき、データファイルはpackage_name.egg-info/SOURCES.txtから取り出される」
「setup.pyを呼び出す前にsetup.pyのpackage_dataリストが更新されるならば、確実にpackage_name.egg-info/SOURCES.txtを削除すること」
(このファイルが残っているとpackage_dataの変更が反映されない?)
If using the include_package_data argument, files specified by package_data will not be automatically added to the manifest unless they are listed in the MANIFEST.in file or by a plugin like setuptools-scm or setuptools-svn.
「include_package_dataを使う場合、package_dataによって指定されたファイルは(・・・しない限り ※後述)自動ではマニフェストに追加されない」
「MANIFEST.inファイルに一覧したり、setuptools-scmやsetuptools-svn プラグインによって一覧されたりしない限り」
理解:include_package_data=Trueを指定したら、package_dataを使ってもMANIFEST.inが必要になる