scipy/oldest-supported-numpy

Issue with oldest-supported-numpy package approach and pip 22.1 build validation with `--no-build-isolation`

lesteve opened this issue · 2 comments

  • pip 22.1 (released recently on May 11) validates build requirements from pyproject.toml when using --no-build-isolation issue and PR
  • in scikit-learn we have oldest-supported-numpy in our pyproject.toml build requirements as advised in your README. I am guessing this is the case for a number of other projects (e.g. pandas does something similar)
  • Trying to do pip install --no-build-isolation . will error with a message like this:
    Some build dependencies for file:///home/local/lesteve/dev/scikit-learn are missing: 'oldest-supported-   numpy'.`
    
  • we also saw some issue in conda-forge with a similar error: conda-forge/scikit-learn-feedstock#186 (comment) (I am guessing that conda-build is using --no-build-isolation)

Any suggestions on how to handle the situation nicely would be more than welcome! As a short-term fix, we have pinned pip to 22.0.4.

To reproduce with scikit-learn:

mamba create -n test cython scipy 'setuptools<60' -y
git clone https://github.com/scikit-learn/scikit-learn
cd scikit-learn
pip install --no-build-isolation .

Error

ERROR: Some build dependencies for file:///home/local/lesteve/dev/scikit-learn are missing: 'oldest-supported-numpy'.

Argh! Thanks for the report @lesteve. That seems like a clear oversight in the Pip PR that introduced this behavior. A pin sounds right as a workaround, I'll go ask for a fix in Pip itself.

pip 22.1.1 has been released with the fix from pypa/pip@30af807. Closing this one, thanks a lot for reporting the issue in the pip issue tracker!