Skip to content

[BUG] licence file included despite explicitly excluded via MANIFEST.in #3977

Open
@calestyo

Description

@calestyo

setuptools version

68.0.0

Python version

3.11.4

OS

Debian sid

Additional environment information

Also using python3-setuptools-scm 7.1.0

Description

I have a project using pyproject.toml which includes a file LICENCE and a symlink COPYING to that.

It seems that setuptools cannot include symlinks (🙁) but instead resolves the, so the very same file is included twice, making the sdist and wheel needlessly bigger.

One way of solving this, would be supporting symlinks ;-) ... or perhaps not including the file if it's a symlink to an already included file (an perhaps restricting this to the recognised licences files?).

Anyway, my issue here is, that I've set up a MANIFEST.in with:

exclude COPYING

yet it still includes the file, which I think it shouldn't do, or should it?

Only if I set:

[tool.setuptools]
license-files = ['LICEN[CS]E*', 'NOTICE*', 'AUTHORS*']

in pyproject.toml it really excludes the file (or probably rather not even includes it in the first place, regardless of my MANIFEST.in.

Expected behavior

Files explicitly excluded, should be excluded. :-)

How to Reproduce

  1. Create a simple empty project with LICENCE and COPYING as a symlink to it, as well a a default pyproject.toml
  2. Also MANIFEST.in as described above
  3. Create a sdist
  4. It will have the COPYING despite the exclusion.

Output

not applicable

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions