-
Notifications
You must be signed in to change notification settings - Fork 122
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
main: ensure config_settings are passed to get_requires_for_build #627
Conversation
44632c4
to
8024b33
Compare
Please see #264. |
The problem is that if we fix this bug some usages of setuptools break. IMO, I'd be happy to have this with some sort of flag that would allow it to be done correctly but have an opt-in to the old behavior to keep setuptools working, and maybe setuptools would finally fix it on their side. (CC @abravalheri) |
Any preference for what I should name the flag? |
|
Given that passing config settings to setuptools' |
What's a good way to reproduce the issue with passing config settings to Did setuptools adding the |
Passing any option that egg_info and sdist/bdist_wheel do not share will result in an error.
Sent with [Proton Mail](https://proton.me/) secure email.
…------- Original Message -------
On Tuesday, June 27th, 2023 at 01:58, James Hilliard ***@***.***> wrote:
> passing config settings to setuptools' get_requires is a practical impossibility the path of least resistance would be for setuptools to actually exclude config settings from get_requires until such time that they are namespaced
What's a good way to reproduce the issue with passing config settings to get_requires? It's unclear to me exactly what the issue is right now.
Did setuptools [adding the --build-option config](pypa/setuptools#3380) change the situation?
—
Reply to this email directly, [view it on GitHub](#627 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AHNRFWGCFNSRYNTI6VCMZX3XNIHZVANCNFSM6AAAAAAZTUGI2Y).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I commented on #264 (comment), but essentially I think we should proceed with this change special-casing setuptools to default to the old behavior. |
I'd prefer to not add more config options, it makes maintenance harder (remember this is something that will end up hardcoded in build scripts for decades!) and makes it more reasonable for build backends to not have a universal We do need a way to temporarily switch to the old behavior, but I think an environment variable would be better suited here, as it won't cause breakage when we remove support for it (after which we would issue a warning if the envvar is set for a while at least).
I agree.
That will still require new versions of setuptools 🫤 |
Environment variable sounds fine.
I think the idea was that a package could provide a custom build backend? [build-system]
requires = ["setuptools"]
build-backend = "backend"
backend-path = ["_custom_build"] # _custom_build.py
import setuptools.build_meta
from setuptools.build_meta import *
def get_requires_for_build_sdist(config_settings=None):
return setuptools.build_meta.get_requires_for_build_sdist()
# etc. Though I don't think that every package that's affected should be adding a workaround, or even chaining to some new |
Also, since this might take a while, what about having something like Otherwise, I don't see a good way to allow non-setuptools backends to work correctly quickly. |
I don't think an env var is much better than a flag. Making something less discoverable doesn't mean we can make breaking changes to it more easily. A
|
8024b33
to
759ce7f
Compare
759ce7f
to
d1921f7
Compare
I'm convinced by the findings in #264 that this is the best way forward. |
@FFY00 did you get a chance to review this? |
This reverts commit e1de503.
* Fix build to a specific version for breaking change in pypa/build#627 (SYN-6113)
Fixes builds for packages like psycopg2(for example if the
--pg-config
config setting needs to be set) that can hard error in some cases withoutconfig_settings
being passed to theirget_requires_for_build
hooks.