question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Validate build dependencies when using `--no-build-isolation`

See original GitHub issue

What’s the problem this feature will solve?

Prevent builds from running when all required build dependencies are not present.

Describe the solution you’d like

pip fails to build with a descriptive message when a build dependency is missing, providing a nicer user experience (IMHO).

Alternative Solutions

  1. Use python-build which does exactly that.
  2. Manually parse pyproject.toml + generate egg info, get additional build requires and validate those are in the environment.

Additional context I see the pip docs on --no-build-isolation state “Build dependencies specified by PEP 518 must be already installed if this option is used.”. I was wondering whether pip would like to mimic the behaviour that python-build has on --no-isolation(Fail nicely if build dependencies are not present) and if so I’m happy to try and push a patch.

Related: https://github.com/pypa/pip/issues/6718

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
uranusjrcommented, Apr 9, 2021

A sanity check to make sure the user actually sets up the environment correctly makes sense to me.

1reaction
pradyunsgcommented, Apr 30, 2021

The change needed here is calling build_env.check_requirements(build_deps) at some point in the codebase, since https://github.com/pypa/pip/blob/main/src/pip/_internal/build_env.py#L158 has the relevant logic already IIUC.

I’m pretty sure the things to figure out here are:

  1. Where to make that call.
  2. How to get build_deps to make that call.
Read more comments on GitHub >

github_iconTop Results From Across the Web

python - pip install --no-build-isolation returns no such option
It is from pip documentation v21.1.3, check your pip version. If you need upgrade, use python -m pip install --upgrade pip.
Read more >
Pip download (just the source packages, no building, no ...
Hi. Sometimes all I want is the source for modules - and I'll work out the dependencies later - manually. So, I have...
Read more >
pyproject.toml - pip documentation v22.3.1
For building packages using this interface, pip uses an isolated environment. That is, pip will install build-time Python dependencies in a temporary ...
Read more >
Dependency Scanning - GitLab Docs
If you use your own runners, make sure your installed version of Docker is not 19.03.0 . See troubleshooting information for details. Dependency...
Read more >
Installing the development version of scikit-learn
Build the project with pip in Editable mode: pip install --verbose --no-build-isolation --editable . Check that the installed scikit-learn ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found