Skip to content

What it the "correct" way to write a setuptools plugin that generates python source files for a wheel? #3180

Answered by abravalheri
plannigan asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @plannigan there is some (very little) documentation about this entry-point in https://setuptools.pypa.io/en/latest/userguide/extension.html#customizing-distribution-options.

It is a very generic and very powerful hook. You need to write a function that accepts a Distribution object and can modify it arbitrarily.

Just note that this hook is called very early when no configuration file was read yet...

Have you considered instead adding a new sub-command to build? There is some discussion/examples in #2591.

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@plannigan
Comment options

@abravalheri
Comment options

@plannigan
Comment options

@abravalheri
Comment options

@abravalheri
Comment options

Answer selected by plannigan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants