What is the graft command in Python's MANIFEST.in file?

夙愿已清 提交于 2019-11-30 17:23:26

You can see such a file in JoshData/pdfminer/MANIFEST.in or openstack/deb-python-falcon/MANIFEST.in for instance.

It is a python project which uses the MANIFEST.in template

A MANIFEST.in file can be added in a project to define the list of files to include in the distribution built by the sdist command.

When sdist is run, it will look for the MANIFEST.in file and interpret it to generate the MANIFEST file that contains the list of files that will be included in the package.

The manifest template has one command per line, where each command specifies a set of files to include or exclude from the source distribution.

Among the MANIFEST commands, you do have:

graft dir   
  include all files under dir

See the Distutils tutorial

The MANIFEST.in file took me a while to understand.
It's the file that distutils uses to collect all the files in your project that will go into the final installer tarball (the file that gets distributed).

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