Function hooked to finalize_distribution_options gets called for sdist+wheel+editable install #4349
Replies: 1 comment 2 replies
-
Can you use Regarding calling the plugin only for It is up to the function implementation to always return the same thing, but you can check for the existence of caching. The easy thing that you can do is to check if the But again, I think it is just easier to use |
Beta Was this translation helpful? Give feedback.
-
I have a python package that infers version of another package from git and is Pep518 enabled, meaning target packages should have this package in their pyproject.toml under build requires section for it to work. It has a function that hooks to setuptools finalize_distribution_options and does the job. What I need to do is to make sure that it only gets called when creating an sdist, and afterwards store version information somewhere and re-use again when creating a wheel or editable install. I need to ensure that this versioning package is a build time dependency only when creating an sdist to sort of speed up the pip install of a target package which has this versioning package as a build time dependency. Is there a way to tell setuptools in pyproject.toml that a dependency is only needed for creation of sdist, and not others?
Beta Was this translation helpful? Give feedback.
All reactions