This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gsakkis
Recipients dripton, gsakkis, tarek
Date 2009-02-17.03:31:38
SpamBayes Score 4.3317e-12
Marked as misclassified No
Message-id <>
> > FWIW I wrote a module that overrides the default build_py and sdist
> > commands with versions that allow specifying package_data recursively
> Maybe that could be a new feature ? 

That would be nice, especially if we want to reimplement as
setup() option at some point. My current implementation doesn't extend
the API, so there's no way to specify a subset of files under a
directory like recursive-include; every directory matched by a glob is
copied in whole (recursively):

import os
from distutils.command.build_py import build_py as _build_py

class build_py(_build_py):
    def find_data_files(self, package, src_dir):
        files = []
        for p in _build_py.find_data_files(self, package, src_dir):
            if os.path.isdir(p):
                             for par,dirs,files in os.walk(p) 
                             for f in files)
        return files

> > (while preserving file permissions, unlike the - buggy IMO - behavior of
> > distutils) so that I can get rid of the
> Sounds like a bug to me, could you fill an issue on that ?

If it's a bug, it's certainly not accidental; there's a big XXX comment
justifying this choice but I'm not convinced. I posted about it at;
if you think it's a bug I'll fill an issue.
Date User Action Args
2009-02-17 03:31:43gsakkissetrecipients: + gsakkis, dripton, tarek
2009-02-17 03:31:43gsakkissetmessageid: <>
2009-02-17 03:31:40gsakkislinkissue2279 messages
2009-02-17 03:31:38gsakkiscreate