views:

100

answers:

2

I'm trying to use Distribute for my project's setup.py. I want it to include all the files in the package folder, which are text and image files, but not .pyc files of course. I read that the files should either be tracked by CVS and SVN, or there should be a MAINFEST.in.

So:

  1. I use neither CVS nor SVN, I use git. I know that it's possible to write a plugin for git, and perhaps someone has, but I'm not going to use some plugin that I don't know if it will be maintained and supported. Also, git is tracking more than the source folder, the repo includes other files which shouldn't be packed in the distribution.

  2. I thought that one of the perks of Distribute is not having to deal with a MANIFEST.in file. Do I really have to? If so, where do I see a guide? I've never written a MANIFEST.in.

Is there any nicer solution?

A: 

I don't know if there is better documentation yet for distribute so you may have to refer to the documentation for setuptools from which distribute was forked. In particular, see the section on Including Data Files.

Ned Deily
+4  A: 

I've change that behavior in Distutils (in Python trunk (2.7/3.2) )

Now all files mentioned in package_data will be included by default without having to write a MANIFEST.in file, and without having to use the magic behavior based on DVCS.

Until then, I would recommend using an explicit MANIFEST.in and stick with plain Distutils options, so you don't rely on any VCS, and you don't add files by accidents, that are in your repository, but that you don't want to see added in your release.

Distribute 0.7.x will probably stick with Distutils upcoming default behavior.

Look for the MANIFEST.in template language in the Distutils doc, it's quite simple.

Tarek