Skip to content

Conversation

@takluyver
Copy link
Member

@takluyver takluyver commented Oct 25, 2025

This is meant to ease making --no-use-vcs the default for flit build and flit publish, by generating sdist include & exclude patterns to produce sdists with the same contents as before. See #673.

To use it:

  • Generate any files that should be excluded from the sdist, e.g. virtualenvs, built docs, test coverage results, so the script can see them.
    • But only files/folders within included folders actually need to be excluded - extra things in the project root are left out by default
  • cd to the project root (where pyproject.toml is)
  • Run python -m flit.sdist_rules
  • Copy the output into pyproject.toml, make any changes you want

At present, this only looks at the files in the folder, aiming to include anything tracked in git, and exclude anything that isn't. This is why it's necessary to generate the unwanted files first. I'm still thinking about whether it can be smarter using .gitignore.

@takluyver takluyver added this to the 4.0 milestone Oct 25, 2025
@takluyver takluyver mentioned this pull request Oct 25, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants