Skip to content

PEP 518 and the future of custom or directly invoked commands? #1515

@pganssle

Description

@pganssle

I think the current trajectory of setuptools is that we're deprecating direct invocation of most if not all custom commands, and as such the PEP 518 support is moving entirely to pip. This is fine for install and wheel and presumably build and several other commands will also be implemented in pip, while test is switching over to pytest and upload is switching over to twine.

However, people have long been able to write custom commands and have integrated them into their workflow, so they invoke python setup.py lint or python setup.py clean or something. What are we planning on doing for all of those?

My $0.02 is that I think we can't realistically get rid of these (and, frankly, I'm not sure we want to), but invocation via setup.py is a non-starter because the dependencies really have to happen before the script is invoked.

As such, I suggest that we create a new entry point script distributed with setuptools, like pysetup. This would be a thin wrapper around python setup.py that is PEP 518-aware. It would install the required dependencies in an isolated build environment and could even address #1201 with a [tool.setup] section of pyproject.toml.

CC: @jaraco @dstufft @benoit-pierre @di @pradyunsg @pfmoore

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DiscussionIssues where the implementation still needs to be discussed.question

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions