[issue11805] package_data only allows one glob per-package

Éric Araujo report at bugs.python.org
Mon Jan 16 17:23:34 CET 2012


Éric Araujo <merwok at netwok.org> added the comment:

Copied from #13712:

[I]
Problem is that the setup.cfg syntax does not define how to give more than one value.  If it’s judged acceptable to disallow paths with embedded spaces, we could do something like this:

[files]
package_data =
    spam = first second third

Otherwise we’d need to use multiple lines (requested in #5302) [actually no, it was this bug #11805]

[files]
package_data =
    spam = first
    spam = second
    spam = third

We probably don’t want that.  An intermediate idea:

[files]
package_data =
    spam = first
           second
           third

Not sure this would be the nicest thing for people to write, and for us (me) to extend the setup.cfg parser for.


[Erik Bray]
FWIW, I'm for the first option for specifying package_data:

[files]
package_data =
    spam = first second third

I'm pretty sure this is how I ended up implementing it in d2to1, since I needed this functionality.

Theoretically spaces could be supported with an escape sequence, but I don't think that's worth complicating things for if package_data is deprecated anyways.  I'm all for making it difficult for anyone trying to include filenames with spaces in their source code.


So, I think allowing spaces and newlines to separate multiple values will be the nicest (spaces only would require users to cram all there file specs on one line).

----------

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


More information about the Python-bugs-list mailing list