poetry-core icon indicating copy to clipboard operation
poetry-core copied to clipboard

Add build config settings to core

Open earonesty opened this issue 1 year ago • 5 comments

The build() function takes optional config-settings which can be useful for building gpu-specific packages, editable-mode settings for setuptools, or other build-tool specific configurations. If used, should resolve a number of issues. For example: https://github.com/python-poetry/poetry/issues/8909

(Sorry for the million commits, im editing this in a browser.)

See: https://build.pypa.io/en/stable/api.html. Typing matches that.

If there's no objections, will finish adding tests, etc.

earonesty avatar Mar 27 '24 14:03 earonesty

If there's no objections, will finish adding tests, etc.

I think, we are open for this setting. Please also create a downstream (draft) PR that shows the usage of this setting. (You can replace the poetry-core dependency with a git dependency pointing to your branch in a temporary commit that will be dropped before merging.)

radoering avatar Apr 01 '24 09:04 radoering

Yes.

On Mon, Apr 1, 2024, 5:09 AM Randy Döring @.***> wrote:

@.**** requested changes on this pull request.

I suppose, this setting is relevant for all types of dependencies because it's not just relevant for directories but also for sdists?

— Reply to this email directly, view it on GitHub https://github.com/python-poetry/poetry-core/pull/715#pullrequestreview-1970951525, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMMUJYRLHL4LPQMM3BMR3Y3EP3BAVCNFSM6AAAAABFLAEW42VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSNZQHE2TCNJSGU . You are receiving this because you authored the thread.Message ID: @.***>

earonesty avatar Apr 01 '24 13:04 earonesty

Hello @earonesty Any updates here? Maybe do you need help with this PR?

igor-sadchenko avatar Jun 26 '24 19:06 igor-sadchenko

I never finished the other side of it. This PR is complete from what I can tell

On Wed, Jun 26, 2024, 12:03 PM Igor Sadchenko @.***> wrote:

Hello @earonesty https://github.com/earonesty Any updates here? Maybe do you need help with this PR?

— Reply to this email directly, view it on GitHub https://github.com/python-poetry/poetry-core/pull/715#issuecomment-2192439103, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMMUMFEAIT5N33ZHSVRN3ZJMF6PAVCNFSM6AAAAABFLAEW42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJSGQZTSMJQGM . You are receiving this because you were mentioned.Message ID: @.***>

earonesty avatar Jun 27 '24 19:06 earonesty

@earonesty apologies for getting to this sooner. Really appreciate your effort in getting this proposed. I have proposed python-poetry/poetry#10129 which will close this out unfortunately.

While I can see the value add in having this configurable in the dependency spec, I do not think this is the appropriate solution for this as things stand. By the nature of these config settings, they are not universal in most cases. A configuration that works for a user on linux machine might not work for someone on an osx machine (or vice-versa) etc.

This is why python-poetry/poetry#10129 proposes the introduction of a configuration setting instead of an addition to the pyproject.toml file.

Yes, there are some cases where it might make sense to have a "default" config for every developer (think corporate environment with uniform developer environments). For these cases, I propose that users simply commit a poetry.toml with the config to their project until we stablise the config and maybe propose a "standard" way to provide project specific configuration without compromising the ability for users to override their local and/or project local config.

Please also let me know if there are areas that the proposal falls short on for your original use case.

Once again, thank you for your contributions.

abn avatar Jan 31 '25 16:01 abn