pypa / pypa/setuptools

[FR] Support specifying MANIFEST.in config via pyproject.toml

Open
#3,341 11 comments 41 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Needs Triage
Dominant language
Python
Stars
2.9k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

What's the problem this feature will solve?

Now that setuptools has support for specifying setup.cfg options in pyproject.toml, one config file remains: MANIFEST.in. It would be nice if MANIFEST.in options could be specified in pyproject.toml so that a setuptools project could be configured entirely through one file.

(And before anyone suggests it, setuptools_scm does not help me: there are files in source control that I don't want to include in sdists, like .gitignore and .github/, so I'd still need a MANIFEST.in, and I'm back to square one.)

Describe the solution you'd like

Just spitballing: the following MANIFEST.in:

graft tests
global-exclude *.py[cod]

could be represented in pyproject.toml as:

[tool.setuptools]
manifest = [
    "graft tests",
    "global-exclude *.py[cod]",
]

or maybe:

[tool.setuptools]
manifest = [
    ["graft", "tests"],
    ["global-exclude", "*.py[cod]"],
]
Alternative Solutions

No response

Additional context

No response

Code of Conduct
  • I agree to follow the PSF Code of Conduct

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how setuptools currently reads configuration from pyproject.toml and how MANIFEST.in directives are parsed. Compare the proposed string-list and nested-list representations, then identify the configuration and manifest-processing entry points that would need coverage. Done means projects can express the relevant MANIFEST.in directives in pyproject.toml without losing existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.