Support for custom build steps
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
I've seen cases where users wish to add custom steps to the build process (example, example). Historically, users have managed to work around the issue by overriding the build or install commands (using cmdclass), but this approach requires replacing the default command just to inject some behavior. Preferable would be to avoid having to override the default behavior and for Setuptools to present a protocol for extending build steps.
And indeed, distutils already provides a mechanism to extend build steps through sub_commands.
My proposal is that the build command present an interface to append or prepend commands to the build subcommands such that a third-party provider could provide an independent command, expose it through distutils.commands, and either implicitly as part of the import or explicitly by the end user, append or prepend that command to the subcommands.
I think it should be possible to demonstrate this behavior today just by mutating the sub_commands list directly, though I'd probably recommend a proper API for users to use.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the distutils build command's sub_commands mechanism linked in the issue, then examine how Setuptools exposes the build command and existing cmdclass overrides. Define and demonstrate an interface that lets third-party or user-provided commands be appended or prepended to the build subcommands without replacing the default command.
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
- 30/100