poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Support arbitrary build directories

Open rossburton opened this issue 1 year ago • 1 comments

Issue Kind

Change in current behaviour

Description

When building code with poetry.core I really want to know that the build tree is pristine, so the ability to tell poetry.core to use a specific directory as the build tree (instead of hardcoding build under the project, see https://github.com/python-poetry/poetry-core/blob/15814280a9f0be19aaf7d9ba09d16d6a9e37fff5/src/poetry/core/masonry/builders/wheel.py#L216) would be useful.

Notably, https://github.com/Bluetooth-Devices/dbus-fast/issues/330 is because a build tree is being reused.

Impact

Improves build quality by ensuring the build tree is pristine.

Workarounds

None.

rossburton avatar Nov 15 '24 15:11 rossburton

per https://github.com/python-poetry/poetry/issues/2740, this whole feature is not really supported.

Recommend that if this is important to you then the best chance of success would be to submit a pull request.

dimbleby avatar Nov 15 '24 16:11 dimbleby

I don't think we will implement this in core as it is a PEP 517 backend.

In #10059 we have also introduced isolated builds when using the build command. In the next release however, #10092 will mean we won't isolate the build for packages that only specify poetry-core until the release.

This means, once the deprecation cycle is complete, all wheels built will use an isolated builder thereby providing pristine build trees based on your sdist.

Obviously, this does not cover sdists as any source files needed to make the package (including c source files) should be included.

abn avatar Jan 31 '25 21:01 abn

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Mar 03 '25 00:03 github-actions[bot]