New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
distutils sdist add_defaults does not add data_files #46532
Comments
distutils.sdist.add_defaults adds the Python modules and scripts and C This is non-orthogonal and confusing, because it means that a |
Agreed; package_data are also ignored by sdist. Unfortunately, neither MANIFEST.in is an ugly hack and should be deprecated; you shouldn't have |
I'll change add_defaults() so it includes package_data. I don't think though, that MANIFEST.in is an ugly hack. Imho the best |
I didn't mean to imply that automagic discovery based on external |
Right, but if MANIFEST.in is removed, I can see cases where you would For instance, how would you tell sdist to recursively add files located |
By an equivalent option in setup() of course. I'm not against the FWIW I wrote a module that overrides the default build_py and sdist |
Ok I have finished the patch, I'll commit it during the week
Maybe that could be a new feature ?
Sounds like a bug to me, could you fill an issue on that ? |
done in r69692 and r69696. |
That would be nice, especially if we want to reimplement MANIFEST.in as 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):
files.extend(os.path.join(par,f)
for par,dirs,files in os.walk(p)
for f in files)
else:
files.append(p)
return files
If it's a bug, it's certainly not accidental; there's a big XXX comment |
Great, thanks. The data_files part though seems incorrect; for one thing if self.distribution.has_data_files():
for item in self.distribution.data_files:
if isinstance(item, basestring): # plain file
self.filelist.append(convert_path(item))
else: # an (outdir, files) tuple
outdir,data_files = item
self.filelist.extend(convert_path(f) for f in data_files) |
added in r69710. Thx |
2009/2/17 George Sakkis <report@bugs.python.org>:
Please could you add a feature request ? We will need to discuss it there.
Please do so, I am focusing on the Distutils-SIG ML , so I missed it I don't know yet what is a proper way to adress this, but the bug tracker seem
|
ok thanks
Right, thanks George. I'v also added you in the ACKS for your contribution |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: