Skip to content

Installing poetry project results in get pip._vendor.pep517.wrappers.BackendUnavailable #6100

Open
@cs01

Description

@cs01

Environment

  • pip version: pip 19.0.dev0
  • Python version: Python 3.7.0
  • OS: mac

Description

I have a pyproject.toml with

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

I expected the pep 517 implementation to be able to handle pip installs of the source code.

Expected behavior

Successfully install package using pyproject.toml to define a build system other than setup.py.

How to Reproduce

  1. Clone latest pip, install to venv with pip install -e .
  2. Then run pip install -e . or pip install . on a project without a setup.py
  3. An error occurs.

Output

>> pip install -e .
Directory '.' is not installable. File 'setup.py' not found.
>> pip install .
Processing /Users/user/git/project
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
Exception:
Traceback (most recent call last):
  File "/Users/user/git/pip/src/pip/_internal/cli/base_command.py", line 154, in main
    status = self.run(options, args)
  File "/Users/user/git/pip/src/pip/_internal/commands/install.py", line 315, in run
    resolver.resolve(requirement_set)
  File "/Users/user/git/pip/src/pip/_internal/resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
  File "/Users/user/git/pip/src/pip/_internal/resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/Users/user/git/pip/src/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
    self.require_hashes
  File "/Users/user/git/pip/src/pip/_internal/operations/prepare.py", line 356, in prepare_linked_requirement
    abstract_dist.prep_for_dist(finder, self.build_isolation)
  File "/Users/user/git/pip/src/pip/_internal/operations/prepare.py", line 156, in prep_for_dist
    reqs = self.req.pep517_backend.get_requires_for_build_wheel()
  File "/Users/user/git/pip/src/pip/_vendor/pep517/wrappers.py", line 66, in get_requires_for_build_wheel
    'config_settings': config_settings
  File "/Users/user/git/pip/src/pip/_vendor/pep517/wrappers.py", line 155, in _call_hook
    raise BackendUnavailable
pip._vendor.pep517.wrappers.BackendUnavailable

poetry>=0.12 is installed:

>> pip freeze
attrs==18.2.0
CacheControl==0.12.5
cachy==0.2.0
certifi==2018.11.29
chardet==3.0.4
cleo==0.6.8
html5lib==1.0.1
idna==2.8
jsonschema==3.0.0a3
lockfile==0.12.2
msgpack==0.6.0
pastel==0.1.0
pkginfo==1.4.2
poetry==0.12.10
pylev==1.3.0
pyparsing==2.3.0
pyrsistent==0.14.8
requests==2.21.0
requests-toolbelt==0.8.0
shellingham==1.2.8
six==1.12.0
tomlkit==0.5.3
urllib3==1.24.1
webencodings==0.5.1

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions