[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
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)
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.
The package in question orjson using PEP 517 (maturin). We seem to be failing too fast - prior to parsing metadata from sdist.
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.
Most helpful comment
The root cause for this issue is that we falback to using
sdistwhen determining package information as the repository contains ansdisturl and no universal wheel.https://github.com/python-poetry/poetry/blob/687a897e85ce1668ffee746bf050cc9f0bdf0fb1/poetry/repositories/pypi_repository.py#L407-L411
The package in question
orjsonusing 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
Noneandsetup.pydoes not exist. Additionally, support ofPEP 517builds in the inspection process will further improve this.