-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pluggable hooks for parse_configuration #1272
Comments
@KOLANICH Can you elaborate? What interface do you propose to be extensible? How would setuptools advertise/solicit these extensions? I'm skeptical that such a pluggable interface will be viable or desirable, so anything you can do to persuade this project that it's a good idea will help move this issue forward. |
So It's a naive way. It slows down with the count of extensions registered. There is a better way, provide metadata binding section names to the extensions and build a dict and lookup it on unknown section occurence. So they should only be called if the section has actually occured. |
actually we could just register config keys the same way we register distribution obptions, or even reuse that |
If I understood correctly this feature could be useful for implementing things like: ...
ext_modules = cytonize: file.pyx
... or [options.ext_modules.cytonize]
primes =
sources = primes.pyx
include_dirs = [...]
libraries = [...]
library_dirs = [...] right? If that is the case, I think the feature would be very desirable... Even though it is very straightforward doing extensions directly in Additionally, it allows offloading some responsibilities from the setuptools core. In the aforementioned example, implementing the (de)serialization of the extension descriptor objects to be stored in Another example I could think of is: long_description = orgmode: README.org I hope this helps to clarify the scenario where this kind of pluggable hook could be used. |
@KOLANICH Has this been completed? If so, how can we make it? |
Look at
https://github.com/pypa/setuptools/blob/master/setuptools/config.py#L104L110
It's hardcode. It prevents from extending configuration parser with custom specs for setup.cfg. For example setuptools_scm cannot be set up via setup.cfg. Or my new extension.
I propose to plug endpoints here.
The text was updated successfully, but these errors were encountered: