check-manifest: Ignoring dir/* does not ignore directory itself

#90 seems to suggest that (for example) .github/* will ignore the whole .github folder, once version 0.38 is released.

However, since .github/* does not match the .github folder added by add_directories in VCS.get_versioned_files, there will still be a false positive reported.

Ignoring dir does not work either, as now the files inside the directory don’t get ignored. dir* does work I believe, but is dangerous because it will also ignore other folders with the same prefix such as dir2 and everything inside those folders.

Maybe this is intended behavior, but then it’s a rather unexpected one from my perspective, as I see no reason to warn about a folder which has no content to warn about?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

How did you run it

fakeroot check-manifest at the root of the git checkout.

In this case which is a proper way to test it?

I’m not familiar with your project structure and CI setup, so I cannot say. (I’ve never used GitHub Actions.)

If you still get complaints from check-manifest, then we can investigate further.

I’ve been refactoring check-manifest for the last couple of days to add tests for its ignore logic, and I’be been adding those tests and finding all sorts of bugs and inconsistencies with what distutils/setuptools actually does, so fixing this is going to require a massive rewrite.

Luckily I’m almost finished with that. The tests are currently failing on Python 2.7 and I’m seriously considering dropping Python 2.7 support rather than spend more time on this.

The good news: your example works perfectly with my new code!

Ok, at this point I have to admit that I don’t remember how the ignore handling works.

I do see that when I parse prune subdir directives in a MANIFEST.in, I’m adding both subdir and subdir + ‘/*’ to the ignore pattern list.

I wonder what things would break if I made the /* part implicit for all the ignore patterns?