Python package with data files

久未见 提交于 2020-01-02 23:03:52

问题


A Python package should contain some data files alongside with Python sources.

  1. How to make setuptools or distutils to install the data files?

  2. How can my Python code know which directories my data files are installed in?


回答1:


Following will answer your Q#1:

There is a concept of data_file and package_data.

Package_data is used to include documentation and data_files is used to include configuration file, messages and data file.



来源:https://stackoverflow.com/questions/48696115/python-package-with-data-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!