[BUG] macOS: sdist installs with build isolation are broken in 63.1.0 with Python 3.9
glexey opened this issue · comments
setuptools version
setuptools==63.1.0
Python version
Python 3.9
OS
MacOS
Additional environment information
No Homebrew is installed.
Description
Installing any pyproject.toml-based sdist package fails if Homebrew is not installed with the error error: [Errno 2] No such file or directory: 'brew'
Expected behavior
Installation of pyproject.toml-based sdist packages does not fail in absence of Homebrew.
How to Reproduce
- git clone https://github.com/pypa/sampleproject.git
- pip3 install ./sampleproject
- Observe the error
- Run same with --no-build-isolation – installation works fine
Output
bash-3.2$ git clone https://github.com/pypa/sampleproject.git
Cloning into 'sampleproject'...
remote: Enumerating objects: 543, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 543 (delta 4), reused 11 (delta 4), pack-reused 529
Receiving objects: 100% (543/543), 140.03 KiB | 1.08 MiB/s, done.
Resolving deltas: 100% (269/269), done.
bash-3.2$ pip3 install ./sampleproject
Looking in indexes: https://pypi.apple.com/simple
Processing ./sampleproject
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: peppercorn in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from sampleproject==2.0.0) (0.6)
Building wheels for collected packages: sampleproject
Building wheel for sampleproject (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for sampleproject (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/sample
copying src/sample/__init__.py -> build/lib/sample
copying src/sample/simple.py -> build/lib/sample
copying src/sample/package_data.dat -> build/lib/sample
installing to build/bdist.macosx-10.9-universal2/wheel
running install
error: [Errno 2] No such file or directory: 'brew'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for sampleproject
Failed to build sampleproject
ERROR: Could not build wheels for sampleproject, which is required to install pyproject.toml-based projects
bash-3.2$ pip3 install ./sampleproject --no-build-isolation
Looking in indexes: https://pypi.apple.com/simple
Processing ./sampleproject
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: peppercorn in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from sampleproject==2.0.0) (0.6)
Building wheels for collected packages: sampleproject
Building wheel for sampleproject (pyproject.toml) ... done
Created wheel for sampleproject: filename=sampleproject-2.0.0-py3-none-any.whl size=4227 sha256=c3c1822b9acd511f0a6183f83a097950deee81a491c79952d451007ac81629bb
Stored in directory: /private/var/folders/88/0g93p0hx7051251t8dn0k7dh0000gp/T/pip-ephem-wheel-cache-_j8045fd/wheels/c2/c3/c7/84b41e4e7da867eb5829b3f3f644e1337848cd8118a340dec7
Successfully built sampleproject
Installing collected packages: sampleproject
Attempting uninstall: sampleproject
Found existing installation: sampleproject 2.0.0
Uninstalling sampleproject-2.0.0:
Successfully uninstalled sampleproject-2.0.0
Successfully installed sampleproject-2.0.0
bash-3.2$
This commit seems to be the source of the bug: 152c13d#diff-b8c2b4cde6548b0f786c42f81cac8368126e15ab80def4091edf04656d5ae6a9R18
Dupe of #158.