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

Unable to install pyre2 from git #3286

Closed
3 tasks done
yoav-orca opened this issue Oct 25, 2020 · 3 comments
Closed
3 tasks done

Unable to install pyre2 from git #3286

yoav-orca opened this issue Oct 25, 2020 · 3 comments
Labels
area/docs/faq Frequently duplicated/potential addition to FAQ kind/question User questions (candidates for conversion to discussion)

Comments

@yoav-orca
Copy link

  • 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: macOS Cataline 10.15.7 (19H2)
  • Poetry version: 1.1.3
  • the contents of your pyproject.toml file:
[tool.poetry]
name = "poetry_bug"
version = "0.1.0"
description = ""
authors = ["author@author.com"]

[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"

Issue

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 #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 yoav-orca added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 25, 2020
@abn
Copy link
Member

abn commented Oct 25, 2020

@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__"

@yoav-orca
Copy link
Author

@abn thanks, it worked. I'll try to push this fix to pyre2

@abn abn added kind/question User questions (candidates for conversion to discussion) area/docs/faq Frequently duplicated/potential addition to FAQ and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 26, 2020
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/faq Frequently duplicated/potential addition to FAQ kind/question User questions (candidates for conversion to discussion)
Projects
None yet
Development

No branches or pull requests

2 participants