[issue5302] Allow package_data globs match directories

George Sakkis report at bugs.python.org
Wed Feb 18 14:57:14 CET 2009


George Sakkis <george.sakkis at gmail.com> added the comment:

> I am no in favor of MANIFEST.in removal because I find it very
> convenient to define what is included in a package  and I rarely use
> package_data or data_files. 

AFAIK the MANIFEST is used only by sdist; what's the point of including
files in the archive sdist creates if they are not going to be installed
somewhere ? The only case I can think of is temporary files/modules
needed only for the installation.
 
> Maybe some kind of plugin system could be created so people can
> implement their own way to get a file list. I am thinking here about
> the feature in setuptools that builds the file list using .svn,
> so you don't have to define anything at all.

Right, but it's still good to have a shortcut for the common cases
expressed in MANIFEST.in; anything more complex can use the plugin.
 
> In any case, for the glob in data_files, how do you express this
> MANIFEST.in line ?
> 
> recursive-include directory/subdir *.py *.txt

Currently I don't; that requires a modification (or extension) of the
API, for example instead of a flat list of globs, expect a list of (dir,
globs, recursive) tuples. For convenience we could define an adaptor
function "def match(dir=None, globs=('*',), recursive=True)" to create
the triples from the provided args.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5302>
_______________________________________


More information about the Python-bugs-list mailing list