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

[build-system] contents not honored #4871

Closed
3 tasks done
bsvedin opened this issue Dec 8, 2021 · 5 comments
Closed
3 tasks done

[build-system] contents not honored #4871

bsvedin opened this issue Dec 8, 2021 · 5 comments
Labels
kind/bug Something isn't working as expected

Comments

@bsvedin
Copy link

bsvedin commented Dec 8, 2021

  • I am on the latest Poetry version.

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

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: Windows 10

  • Poetry version: 1.1.12 - also tried 1.2.0a2

  • Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/bsvedin/0b705d54dec6d1834cd2f2864b86cd9d

Issue

The contents of the [build-system] do not appear to be honored.
Specifically Nuitka (version 0.6.18) recently added the build meta for creating compiled whl files.
Updating the build-system section should be all that is required

[build-system]
requires = ["setuptools>=42", "wheel", "nuitka"]
build-backend = "nuitka.distutils.Build"

running "poetry build -f wheel" still builds readable source code wheel file

poetry build -f wheel
Building hello-world-example (0.1.0)
  - Building wheel
  - Built hello_world_example-0.1.0-py3-none-any.whl

I have tried putting in nonsense in as well for the requires and build-backend values and it still builds the whl file without throwing an error.
e.g.
requires = ["l;kasdhfiosadhf", "wheel", "nuitka"]
build-backend = "l;kdsajosadhfl;ksdzxn"

It does throw an error if there are multiple entries for requires or build-backend saying TOMLError key already exists
e.g.
requires = ["setuptools>=42", "wheel", "nuitka"]
build-backend = "nuitka.distutils.Build"
build-backend = "poetry.core.masonry.api"

@finswimmer
Copy link
Member

Hello @bsvedin,

poetry build is not a general build tool for python packages. It is only for building a package from a poetry project. And so it doesn't care about the given build-backend and uses its own automatically.

fin swimmer

@kayhayen
Copy link

@finswimmer is there any way that Nuitka could hook the poetry wheel build just like it does with other systems now? With setuptools and build this works, and if Nuitka were allowed to wrap/subclass things and get used, that would be very useful, at least for my user base.

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
@tony-gm
Copy link

tony-gm commented Mar 26, 2022

This is very import for poetry support customize build-backend;
I'm going to use poetry to manage all python project in my company.
Some project we need to customize some setup hooks.
But poetry can not use build-backend stuck on me.

@finswimmer
Copy link
Member

finswimmer commented Mar 26, 2022

Custom build.py scripts like e.g. in #3576 is an undocumented feature because there is no decision about if its current implementation should/will be the final one. Once this happened the additional dependencies for a build will be honored. @abn started a proof-of-concept some time ago in #2794.

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
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

5 participants