Skip to content

How to filter out .gitignore with python -m build --sdist #1058

Closed
@jamesbraza

Description

@jamesbraza

I have a pyproject.toml like the below:

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools_scm]
version_file = "src/package/version.py"

I noticed after running python -m build --sdist that the built .tar.gz contains version controlled files like .gitignore or folders like .github.

Reading the setuptools docs, it talks about setuptools_scm and including files: https://setuptools.pypa.io/en/stable/userguide/extension.html#adding-support-for-revision-control-systems

Is there some way to, within pyproject.toml, specify to setuptools_scm how to exclude files and folders? Or should one fall back onto MANIFEST.in for exclusions like that?

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