Skip to content

License files that are inside the source folder get included twice #749

@SpecLad

Description

@SpecLad

Create a project like this:

pyproject.toml:

[build-system]
requires = ["flit_core >=3.11,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "foobar"
version = "0"
description = "bazquux"
license-files = ["foobar/test.txt"]

foobar/__init__.py: empty
foobar/test.txt: empty

Build it:

> pyproject-build

Examine the results:

> tar -tf .\dist\foobar-0.tar.gz
foobar-0/foobar/test.txt <---
foobar-0/foobar/__init__.py
foobar-0/foobar/test.txt <---
foobar-0/pyproject.toml
foobar-0/PKG-INFO
> tar -tf .\dist\foobar-0-py2.py3-none-any.whl
foobar/__init__.py
foobar/test.txt <---
foobar-0.dist-info/licenses/foobar/test.txt <---
foobar-0.dist-info/WHEEL
foobar-0.dist-info/METADATA
foobar-0.dist-info/RECORD

As you can see, in both the sdist and the wheel, the license file is included twice. The sdist problem I was only able to reproduce on Windows. The wheel problem occurs on both Windows and Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions