Poetry: Implement the Build Backend Interface described in PEP 517

Created on 7 Jun 2018  路  10Comments  路  Source: python-poetry/poetry

I think it would help adoption if we could use poetry without requiring our users to also use it. I see that poetry publish already generates it. Is there any reason not to include a flag in, for example, poetry build to write it in the project root?

Most helpful comment

A PEP-517 compliant build system is now available: https://poetry.eustace.io/docs/pyproject/#poetry-and-pep-517

All 10 comments

The point is not to have setup.py anymore. Instead, the next version of pip will be able to install packages that have pyproject.toml (see PEP 518 for details) and don't have setup.py. That will require support for [build-system] in Poetry. IIUC, this is a planned feature here.

Oh, I see. Isn't there an issue regarding this? Should I close this and open one?

@ambv I am a little confused. I thought that:

  1. The current version of pip (10.x) already installs packages using pyproject.tomlas per PEP 518.
  2. poetry already acts as a build system tool (as defined in PEP 517).
    Have I been dreaming? :)

@Victor-Savu, oh, if pip 10 already does that then great.

What do you put in your [build-system] section of your pyproject.toml to make pip install your poetry-powered package?

@ambv whoops, I have indeed been dreaming (Present and future were intermingling. Electric sheep were jumping around). pip only added support for PEP 518 and not for PEP 517 (here is the tracking issue for PEP 517 support: https://github.com/pypa/pip/issues/5407) This is mainly because PEP 517 is only provisionally accepted (pending real-world experience from tools such as pip).

Sorry for the confusion! Indeed, poetry would need to be prepared to implement the Build Backend Interface described in PEP 517 in order to be used by pip.

I need this feature and create simple tool for this: poetry-setup. Try it, if someone want it too :)

With tox supporting isolated_build is there a way to set poetry as the build backend?

This would allow us to use tox for testing across multiple versions more easily.

@bertjwregeer This has been added in commit 8055bcf. It will be officially available in the next 0.12 release.

I will try to make another alpha build this week so that it can be tested.聽

@sdispater Awesome. I am sorry I missed the commit!

A PEP-517 compliant build system is now available: https://poetry.eustace.io/docs/pyproject/#poetry-and-pep-517

Was this page helpful?
0 / 5 - 0 ratings