Skip to content
Open
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
25 changes: 25 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,31 @@ To set up ScanCode for local development:
libraries (from the `thirdparty/ directory`), setup the paths, etc.
See https://virtualenv.pypa.io/en/latest/ for more details.

.. note::
**Apple Silicon (M1/M2/M3/M4) users:**
Some native dependencies do not provide ARM64 wheels. Using ARM64 Python
(e.g., Homebrew Python on Apple Silicon) may cause ``./configure --dev``
to fail. A tested workaround is to use x86_64 Python under Rosetta.
See issue #3205 for additional context.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are including a reference to an issue, why not also link this?


If you do not already have an x86_64 Homebrew installation:

.. code-block:: bash

arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO we should not include installation instructions for other packages directly (as it might change and our docs will become outdated, might have other requirements/prerequisites). Instead use a link to their installation docs


Installing x86_64 Python via Homebrew under Rosetta:

.. code-block:: bash

arch -x86_64 /usr/local/bin/brew install [email protected]

Using ``PYTHON_EXECUTABLE`` to point ``./configure --dev`` to that Python:

.. code-block:: bash

PYTHON_EXECUTABLE=/usr/local/bin/python3.12 ./configure --dev

Run this command to configure ScanCode::

./configure --dev
Expand Down
Loading