Skip to content
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

How to implement custom build? #5483

Closed
1 task done
brandon-leapyear opened this issue Apr 22, 2022 · 3 comments
Closed
1 task done

How to implement custom build? #5483

brandon-leapyear opened this issue Apr 22, 2022 · 3 comments
Labels
area/docs Documentation issues/improvements

Comments

@brandon-leapyear
Copy link

  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

Does poetry use the [build-system] section in pyproject.toml? I see it parsed in PyProjectTOML, but I don't see anything in poetry or poetry-core using that property.

I do see tool.poetry.build, which is used in WheelBuilder, but it isn't documented:

Ideally, I would want to be able to run poetry build -f wheel using a custom build.py backend (that does some actions before calling the usual build in poetry-core) with some version of:

# pyproject.toml
[build-system]
backend-path = ["."]
build-backend = "build"

If poetry doesn't use [build-system], why not? What should be used instead? Is tool.poetry.build the way to define a custom build? If so, why isn't it documented?

Related issues:

@brandon-leapyear brandon-leapyear added area/docs Documentation issues/improvements status/triage This issue needs to be triaged labels Apr 22, 2022
@Secrus
Copy link
Member

Secrus commented Apr 23, 2022

There are plans to add support for different build backends, but for now, there is no stable or documented API for that. You can try looking at Pendulum, it uses some hacks and build.py script to build C extensions.

@abn
Copy link
Member

abn commented May 15, 2022

This is a duplicate of #2740 #5539. Also see #5401.

I suspect you are not really looking for "build-system". This section is not directly used by Poetry. It is used by PEP 517 front ends like pypa/build or pip.

@abn abn removed the status/triage This issue needs to be triaged label May 15, 2022
@abn abn closed this as completed May 15, 2022
Copy link

github-actions bot commented Mar 2, 2024

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 github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Documentation issues/improvements
Projects
None yet
Development

No branches or pull requests

3 participants