pypa / pypa/setuptools

Warn (or error) when setuptools.build_meta:__legacy__ is explicitly specified

Open
#1,689 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Per the original discussion, setuptools.build_meta:__legacy__ was intended only as a default and was not intended to be specified as the build backend. If we're going to go ahead with #1688, we'll need to be able to parse pyproject.toml anyway, so this could be a fairly simple way to start working with pyproject.toml and get started on #1688 without committing to support a whole new format.

I'd say it would be a good idea to get this done sooner rather than later, and preferably just make it an error directly, before too many people start using setuptools.build_meta:__legacy__ directly.

Of course, the major downside to this is that it sorta breaks the separation between front-end and back-end in PEP 517, since we now have to read the front end's configuration to determine if it's being used incorrectly. I'm not sure if it's worth maintaining the purity of this separation at the cost of a bunch of people starting to explicitly depend on setuptools.build_meta:__legacy__.

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 reading the existing handling of pyproject.toml and the setuptools.build_meta:legacy backend entry point. Determine whether explicit use should warn or error, while considering the PEP 517 front-end/back-end separation and the related work in #1688. Done means the chosen behavior is implemented and covered by the relevant project checks.

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
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.