-vvv option).[tool.poetry]
name = "poetry_bug"
version = "0.1.0"
description = ""
authors = ["[email protected]"]
[tool.poetry.dependencies]
python = "^3.8"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0", "Cython>=0.29.6"]
build-backend = "poetry.core.masonry.api"
I want to migrate from Pipenv to poetry but I can't seem to install https://github.com/andreasvc/pyre2. The first issue I encountered was https://github.com/python-poetry/poetry/issues/2789, I tried @abn's PR and it seems to get past the Cython issue but now it fails on:
PackageInfoError
Unable to determine package info for path: /var/folders/t5/qqzkc6pd733gyg8dl61_9wcw0000gn/T/pypoetry-git-pyre21tjcywk3
at ~/.local/pipx/venvs/poetry@2794/lib/python3.9/site-packages/poetry/inspection/info.py:477 in _pep517_metadata
473โ try:
474โ venv.run("python", "setup.py", "egg_info")
475โ return cls.from_metadata(path)
476โ except EnvCommandError:
โ 477โ raise PackageInfoError(path)
478โ finally:
479โ os.chdir(cwd.as_posix())
480โ
481โ if info:
I'm happy to contribute code to fix this issue with a bit of guidance
@yoav-orca the issue is that pyre2 does not add Cython to its build-backend.requires. This is not something poetry can resolve. The build for the dependnecy happens in its own isolated environment with whatever it declares as its build requirements.
The fix is for the project to add a pyproject.toml file with the relevant build-system section to the pyre2 project. Here is a minimal pyproject.toml based on what I could figure out from that project.
[build-system]
requires = ["setuptools", "wheel", "Cython>=0.20"]
build-backend = "setuptools.build_meta:__legacy__"
@abn thanks, it worked. I'll try to push this fix to pyre2