Skip to content

Allow adding individual files to the source distribution #2087

@Cito

Description

@Cito

When using setuptools for building source distributions, it is possible to specify extra stuff that should only go into the source distribution, but not into the wheels (like the LICENSE file or unit tests) in the MANIFEST.in file.

The question that was already asked in #1067 - how can we specify such extra files when building sdists with poetry? The proposed and implemented solution was to use the format = "sdist" specification in the packages setting. This works and solves the problem - but only for packages. So I'm re-raising the same question for other extra files that are not packages, for example configuration files like .flake8 or text files with additional information like INSTALLATION.md or AUTHORS.md. As far as I see, only the main README.md and LICENSE files specified in pyproject.toml are included when poetry builds an sdist.

You can specify such files using the include setting, but then they would also appear in the wheels.

So I think poetry is missing something like format = "sdist" for the include and exclude settings, or it should use an existing MANIFEST.in. Alternatively, poetry could automatically include everything that is under version control and not excluded into the source distribution. Or am I missing or misunderstanding something here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureFeature requests/implementations

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions