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

error: subprocess-exited-with-error #34

Closed
KenAijmNight opened this issue Oct 3, 2022 · 4 comments · Fixed by #37
Closed

error: subprocess-exited-with-error #34

KenAijmNight opened this issue Oct 3, 2022 · 4 comments · Fixed by #37

Comments

@KenAijmNight
Copy link

KenAijmNight commented Oct 3, 2022

Collecting pybluemonday
  Using cached pybluemonday-0.0.9.tar.gz (8.4 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: cffi~=1.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from pybluemonday) (1.15.1)
Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from cffi~=1.1->pybluemonday) (2.21)
Building wheels for collected packages: pybluemonday
  Building wheel for pybluemonday (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      uname_result(system='Darwin', node='mbp-van-julian.wifi.hu.nl', release='22.1.0', version='Darwin Kernel Version 22.1.0: Tue Sep 13 21:11:40 PDT 2022; root:xnu-8792.40.101.181.2~2/RELEASE_ARM64_T6000', machine='arm64')
      sh: ./scripts/setup-macos.sh: No such file or directory
      make: *** No rule to make target `clean'.  Stop.
      make: *** No rule to make target `so'.  Stop.
      Requirement already satisfied: cffi~=1.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (1.15.1)
      Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from cffi~=1.1) (2.21)
      make: *** No rule to make target `ffi'.  Stop.
      /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-universal2-cpython-310
      creating build/lib.macosx-10.9-universal2-cpython-310/tests
      copying tests/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/tests
      copying tests/test_memory_leaks.py -> build/lib.macosx-10.9-universal2-cpython-310/tests
      creating build/lib.macosx-10.9-universal2-cpython-310/pybluemonday
      copying pybluemonday/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/pybluemonday
      creating build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      copying tests/bluemonday/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      copying tests/bluemonday/test_policies.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      copying tests/bluemonday/test_sanitize.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      creating build/lib.macosx-10.9-universal2-cpython-310/tests/html_sanitizer
      copying tests/html_sanitizer/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/html_sanitizer
      copying tests/html_sanitizer/test_sanitize.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/html_sanitizer
      running build_ext
      $ GOPATH=/var/folders/_w/82v6x9j9373gjblnbh6_bfnh0000gn/T/tmpj5viix0p go get -d
      error: [Errno 2] No such file or directory: 'go'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pybluemonday
  Running setup.py clean for pybluemonday
Failed to build pybluemonday
Installing collected packages: pybluemonday
  Running setup.py install for pybluemonday ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for pybluemonday did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      uname_result(system='Darwin', node='mbp-van-julian.wifi.hu.nl', release='22.1.0', version='Darwin Kernel Version 22.1.0: Tue Sep 13 21:11:40 PDT 2022; root:xnu-8792.40.101.181.2~2/RELEASE_ARM64_T6000', machine='arm64')
      sh: ./scripts/setup-macos.sh: No such file or directory
      make: *** No rule to make target `clean'.  Stop.
      make: *** No rule to make target `so'.  Stop.
      Requirement already satisfied: cffi~=1.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (1.15.1)
      Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from cffi~=1.1) (2.21)
      make: *** No rule to make target `ffi'.  Stop.
      /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running install
      /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-universal2-cpython-310
      creating build/lib.macosx-10.9-universal2-cpython-310/tests
      copying tests/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/tests
      copying tests/test_memory_leaks.py -> build/lib.macosx-10.9-universal2-cpython-310/tests
      creating build/lib.macosx-10.9-universal2-cpython-310/pybluemonday
      copying pybluemonday/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/pybluemonday
      creating build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      copying tests/bluemonday/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      copying tests/bluemonday/test_policies.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      copying tests/bluemonday/test_sanitize.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      creating build/lib.macosx-10.9-universal2-cpython-310/tests/html_sanitizer
      copying tests/html_sanitizer/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/html_sanitizer
      copying tests/html_sanitizer/test_sanitize.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/html_sanitizer
      running build_ext
      $ GOPATH=/var/folders/_w/82v6x9j9373gjblnbh6_bfnh0000gn/T/tmpee6ov1kr go get -d
      error: [Errno 2] No such file or directory: 'go'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pybluemonday

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
@ColdHeat
Copy link
Owner

ColdHeat commented Oct 3, 2022

I imagine this is from an Apple Silicon Mac? You will need to have go available to build pybluemonday if the published wheels aren't working.

@KenAijmNight
Copy link
Author

Apple Silicon Mac, yes i have

ahw right, an how do i do that with that go thing?

@KenAijmNight
Copy link
Author

I have installed Go to my MacBook but there is still the same error!

@patricksanders
Copy link
Contributor

When installing via pip on an Apple Silicon Mac with go installed, the build still fails with a slightly different error. Here's the important bit:

      running build_ext
      $ GOPATH=/var/folders/hn/0yyzd27s70qbjkglqf7sz2000000gn/T/tmpys_5exgy go get -d
      go: go.mod file not found in current directory or any parent directory.
          'go get' is no longer supported outside a module.
          To build and install a command, use 'go install' with a version,
          like 'go install example.com/cmd@latest'
          For more information, see https://golang.org/doc/go-get-install-deprecation
          or run 'go help get' or 'go help install'.

The immediate problem is that go.mod and go.sum don't seem to be included in the source distribution uploaded to PyPI:

❯ pip download --no-deps pybluemonday
Looking in indexes: [snip]
Collecting pybluemonday
  Using cached [snip]/pybluemonday/pybluemonday-0.0.10.tar.gz
  Preparing metadata (setup.py) ... done
Saved ./pybluemonday-0.0.10.tar.gz
Successfully downloaded pybluemonday

❯ tar -xzvf pybluemonday-0.0.10.tar.gz
x pybluemonday-0.0.10/
x pybluemonday-0.0.10/PKG-INFO
x pybluemonday-0.0.10/README.md
x pybluemonday-0.0.10/bluemonday.go
x pybluemonday-0.0.10/pybluemonday/
x pybluemonday-0.0.10/pybluemonday/__init__.py
x pybluemonday-0.0.10/pybluemonday.egg-info/
x pybluemonday-0.0.10/pybluemonday.egg-info/PKG-INFO
x pybluemonday-0.0.10/pybluemonday.egg-info/SOURCES.txt
x pybluemonday-0.0.10/pybluemonday.egg-info/dependency_links.txt
x pybluemonday-0.0.10/pybluemonday.egg-info/requires.txt
x pybluemonday-0.0.10/pybluemonday.egg-info/top_level.txt
x pybluemonday-0.0.10/setup.cfg
x pybluemonday-0.0.10/setup.py
x pybluemonday-0.0.10/tests/
x pybluemonday-0.0.10/tests/__init__.py
x pybluemonday-0.0.10/tests/bluemonday/
x pybluemonday-0.0.10/tests/bluemonday/__init__.py
x pybluemonday-0.0.10/tests/bluemonday/test_policies.py
x pybluemonday-0.0.10/tests/bluemonday/test_sanitize.py
x pybluemonday-0.0.10/tests/html_sanitizer/
x pybluemonday-0.0.10/tests/html_sanitizer/__init__.py
x pybluemonday-0.0.10/tests/html_sanitizer/test_sanitize.py
x pybluemonday-0.0.10/tests/test_memory_leaks.py

Including those files, e.g. via MANIFEST.in, should allow the legacy install to run successfully.

The reason the legacy build is required, however, is that there's no arm64 wheel published for this package. #37 addresses this and should obviate the need for the legacy install on Apple Silicon machines.

ColdHeat pushed a commit that referenced this issue May 12, 2023
This PR upgrades `cibuildwheel` to the latest version to support building macOS arm64 wheels.

The first version of `cibuildwheel` to support Apple Silicon is [2.10.0](https://github.com/pypa/cibuildwheel/releases/tag/v2.10.0), while support for running with Python 3.6 was dropped in [v2.9.0](https://github.com/pypa/cibuildwheel/releases/tag/v2.9.0). Python 3.6 has been [EOL since the end of 2021](https://peps.python.org/pep-0494/), so I opted to remove support for 3.6. Hope that's okay.

Fixes #34 

Bump versions for cibuildwheel, setuptools-golang, and twine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants