Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] macOS: sdist installs with build isolation are broken in 63.1.0 with Python 3.9 #159

Closed
glexey opened this issue Jul 6, 2022 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@glexey
Copy link

glexey commented Jul 6, 2022

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

  1. git clone https://github.com/pypa/sampleproject.git
  2. pip3 install ./sampleproject
  3. Observe the error
  4. 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$ 
@glexey glexey added bug Something isn't working Needs Triage labels Jul 6, 2022
@glexey
Copy link
Author

glexey commented Jul 6, 2022

This commit seems to be the source of the bug: 152c13d#diff-b8c2b4cde6548b0f786c42f81cac8368126e15ab80def4091edf04656d5ae6a9R18

@jaraco jaraco transferred this issue from pypa/setuptools Jul 13, 2022
@jaraco jaraco added duplicate This issue or pull request already exists and removed Needs Triage labels Jul 13, 2022
@jaraco
Copy link
Member

jaraco commented Jul 13, 2022

Dupe of #158.

@jaraco jaraco closed this as completed Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants