Need help with distutils

Andy Todd andy47 at halfcooked.com
Mon Apr 8 01:00:53 EDT 2002


Martin Sjögren <martin at strakt.com> wrote in 
news:mailman.1018083739.10368.python-list at python.org:

> Hello. I need some help with using distutils. When I run
>    python setup.py sdist
> all my .cvsignore files are included, and I don't see a reason for them 
to
> be included in the source dist, so I want to get rid of them
> automagically. I tried using 'prune' in MANIFEST.in, but that didn't 
work,
> so I tried 'recursive-exclude . .cvsignore' but that didn't seem to work
> either (warning: no previously-included files matching '.cvsignore' found
> under directory '.')
> 
> Am I attacking this the wrong way?
> 
> Any help appreciated.
> 
> 
> Regards,
> Martin Sjögren
> 

The way I've done this for PythonCard (http://pythoncard.sourceforge.net/) 
is to put the following line in my MANIFEST.in file;

global-exclude *cvsignore

If you take a look at the documentation 
(http://www.python.org/doc/current/dist/sdist-cmd.html#sdist-cmd) you will 
notice that the pattern you pass to global-exclude has to be a Unix-style 
"glob" pattern. In that notation '.' is a special character so using 
'.cvsignore' doesn't actually match your files ;-)

Also note that this isn't properly implemented for distutils on Windows or 
Mac. If you try and package a source distribution on Windows, for instance, 
you will get all of your CVS directories in the .zip file as well.

Regards,
Andy
-- 
Contents free posts a speciality



More information about the Python-list mailing list