Poetry: Poetry 1.1.0a2 PackageInfoError

Created on 29 Jun 2020  Â·  3Comments  Â·  Source: python-poetry/poetry

  • [x] I am on the latest Poetry version.
  • [x] I have searched the issues of this repo and believe that this is not a duplicate.

  • OS version and name: Python 3.7 docker image

  • Poetry version: 1.1.0a2

when running poetry install (with dependency of orjson):

Skipping virtualenv creation, as specified in config file.
Updating dependencies
Resolving dependencies...
  PackageInfoError
  Unable to determine package info for path: /tmp/tmpje1crk60/orjson-2.6.5
  at ~/.poetry/lib/poetry/inspection/info.py:406 in from_directory
      402│             return cls.from_package(project_package)
      403│ 
      404│         if not setup_py.exists():
      405│             # this means we cannot do anything else here
    → 406│             raise PackageInfoError(path)
      407│ 
      408│         current_dir = os.getcwd()
      409│ 
      410│         info = cls.from_metadata(path)
Bug

Most helpful comment

The root cause for this issue is that we falback to using sdist when determining package information as the repository contains an sdisturl and no universal wheel.

https://github.com/python-poetry/poetry/blob/687a897e85ce1668ffee746bf050cc9f0bdf0fb1/poetry/repositories/pypi_repository.py#L407-L411

The package in question orjson using PEP 517 (maturin). We seem to be failing too fast - prior to parsing metadata from sdist.

https://github.com/python-poetry/poetry/blob/687a897e85ce1668ffee746bf050cc9f0bdf0fb1/poetry/inspection/info.py#L404-L417

We should only fail if metadata parsing returns None and setup.py does not exist. Additionally, support of PEP 517 builds in the inspection process will further improve this.

All 3 comments

The root cause for this issue is that we falback to using sdist when determining package information as the repository contains an sdisturl and no universal wheel.

https://github.com/python-poetry/poetry/blob/687a897e85ce1668ffee746bf050cc9f0bdf0fb1/poetry/repositories/pypi_repository.py#L407-L411

The package in question orjson using PEP 517 (maturin). We seem to be failing too fast - prior to parsing metadata from sdist.

https://github.com/python-poetry/poetry/blob/687a897e85ce1668ffee746bf050cc9f0bdf0fb1/poetry/inspection/info.py#L404-L417

We should only fail if metadata parsing returns None and setup.py does not exist. Additionally, support of PEP 517 builds in the inspection process will further improve this.

@sdispater @abn Will this be available in alpha release soon? I wish to test it :)

@aviramha this should be included in the 1.1.0a3 release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tonysyu picture tonysyu  Â·  3Comments

sobolevn picture sobolevn  Â·  3Comments

probablykasper picture probablykasper  Â·  3Comments

EdgyEdgemond picture EdgyEdgemond  Â·  3Comments

nikaro picture nikaro  Â·  3Comments