[BUG] licence file included despite explicitly excluded via MANIFEST.in
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
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
- Create a simple empty project with
LICENCEandCOPYINGas a symlink to it, as well a a defaultpyproject.toml - Also
MANIFEST.inas described above - Create a sdist
- It will have the
COPYINGdespite the exclusion.
Output
not applicable
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a project containing LICENCE, a COPYING symlink, pyproject.toml, and MANIFEST.in containing exclude COPYING; then inspect the generated sdist. Compare this with the configuration using license-files in pyproject.toml. Done means an explicit MANIFEST.in exclusion prevents COPYING from appearing in the sdist.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100