[virt-tools-list] [PATCH-v5.5 2/5] add MANIFEST.in to specify includes and excludes

Cole Robinson crobinso at redhat.com
Wed Apr 10 20:25:35 UTC 2013


On 04/09/2013 03:18 PM, Gene Czarcinski wrote:
> With no MANIFEST.in, distutils/setup/sdist gets the filelist
> mostly correct except that it adds in whatever is in the
> top directory.  Using git-ls-files is not a good solution
> either because a number of additional files (not git
> managed) will be needed.
> 
> The solution is to use a MANIFEST.in.  All of the
> toplevel files which are to be included will need to be
> specified.  Also, each directory will need to be specified
> and unwanted files (e.g., *.pyc) excluded.  Other (non-specified)
> files and directories will be ignored.
> .
> Signed-off-by: Gene Czarcinski <gene at czarc.net>
> ---
>  MANIFEST.in | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>  create mode 100644 MANIFEST.in
> 
> diff --git a/MANIFEST.in b/MANIFEST.in
> new file mode 100644
> index 0000000..5afeeeb
> --- /dev/null
> +++ b/MANIFEST.in
> @@ -0,0 +1,26 @@
> +# to be included/excluded from the tarball produced by sdist
> +include AUTHORS COPYING HACKING INSTALL NEWS README
> +include autobuild.sh
> +include MANIFEST

We don't want to package this since.

> +include MANIFEST.in
> +include setup.py
> +include todo.txt
> +include .tx/config
> +include virt-*
> +exclude build dist
> +recursive-include data *
> +recursive-include man *
> +recursive-include po *
> +recursive-include tests *

Drop the trailing *

> +recursive-exclude tests *.pyc

Then recursive-exclude *.pyc should cover it for all directories.

Thanks,
Cole




More information about the virt-tools-list mailing list