Upgrading py-poetry-core and pep517

Ryan Schmidt ryandesign at macports.org
Sun Sep 11 18:21:27 UTC 2022

On Sep 11, 2022, at 12:40, David Gilman wrote:
> There's a new release of poetry and py-poetry-core and poetry. I have
> the PR ready at https://github.com/macports/macports-ports/pull/16088
> . However, I am unable to get it to cleanly upgrade from an older
> version of py-poetry-core.
> I think the issue has to do with the pep517 machinery intertwining
> with Poetry. If you have an old version of py-poetry-core / poetry
> installed the Python imports to do the pep517 build are trying to
> import across old and new versions of py-poetry-core / poetry and
> refactoring internal to those packages is breaking the install.
> I am pretty stumped here about what to do next. Is there functionality
> in the Portfile DSL to force an uninstall/reinstall? That would be a
> quick and easy fix.

No. If your port cannot build correctly when a previous version of itself is installed, you can use something like:

PortGroup conflicts_build 1.0
conflicts_build ${subport}

However this should be considered a temporary measure until the bug in the build system can be corrected.

> As far as the "python.pep517_backend" field in the Python portgroup
> goes, it needs to be left default (setuptools) otherwise you get a
> cyclical dependency of py-poetry-core on py-poetry-core.

More information about the macports-dev mailing list