Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Changelog
Next release
--------------

- Document the Apple Silicon (M1/M2/M3/M4) ``./configure --dev`` workaround
in ``CONTRIBUTING.rst`` for contributors using an arm64-only Homebrew
Python.
https://github.com/aboutcode-org/scancode-toolkit/issues/4650

- Fix the optional ``licenses`` extra dependency typo to install
``licensedcode-data``.
https://github.com/aboutcode-org/scancode-toolkit/pull/5056
Expand Down
22 changes: 22 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,28 @@ To set up ScanCode for local development:

configure --dev

If you are on Apple Silicon (M1/M2/M3/M4) and your ``python3`` is an
arm64-only Homebrew install, ``./configure --dev`` may fail with an
error such as::

ERROR: No matching distribution found for extractcode-7z==16.5.210531

This happens because some native thirdparty dependencies do not have
pre-built wheels for the arm64 architecture. ``configure`` already
relaunches itself under Rosetta on Apple Silicon, but this only helps
if the Python interpreter it finds is a universal or x86_64 binary; an
arm64-only Homebrew Python still runs natively and the pinned arm64-less
dependencies fail to resolve. To work around this, install an x86_64
Python via Rosetta and point ``configure`` to it::

arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 /usr/local/bin/brew install python@3.12
echo "/usr/local/bin/python3.12" > PYTHON_EXECUTABLE
./configure --dev

See `issue #3205 <https://github.com/aboutcode-org/scancode-toolkit/issues/3205>`_
for more background on Apple Silicon compatibility.

Then activate the virtual environment::

source venv/bin/activate
Expand Down
Loading