diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a09373e288..977caa159f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,9 @@ v34.10.1 (unreleased) Resolving requirements.txt files will now return proper license data. https://github.com/aboutcode-org/scancode.io/issues/1598 +- Add support for installing on Apple Silicon (macOS ARM64) in dev mode. + https://github.com/aboutcode-org/scancode.io/pull/1646 + v34.10.0 (2025-03-21) --------------------- diff --git a/Makefile b/Makefile index adfac17536..2fbf028828 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ VENV_LOCATION=.venv ACTIVATE?=. ${VENV_LOCATION}/bin/activate; MANAGE=${VENV_LOCATION}/bin/python manage.py VIRTUALENV_PYZ=etc/thirdparty/virtualenv.pyz +PIP_ARGS=--find-links=./etc/thirdparty/dummy_dist # Do not depend on Python to generate the SECRET_KEY GET_SECRET_KEY=`head -c50 /dev/urandom | base64 | head -c50` # Customize with `$ make envfile ENV_FILE=/etc/scancodeio/.env` @@ -51,11 +52,11 @@ virtualenv: conf: virtualenv @echo "-> Install dependencies" - @${ACTIVATE} pip install -e . + @${ACTIVATE} pip install ${PIP_ARGS} --editable . dev: virtualenv @echo "-> Configure and install development dependencies" - @${ACTIVATE} pip install -e .[dev] + @${ACTIVATE} pip install ${PIP_ARGS} --editable .[dev] envfile: @echo "-> Create the .env file and generate a secret key" diff --git a/etc/thirdparty/dummy_dist/README.txt b/etc/thirdparty/dummy_dist/README.txt new file mode 100644 index 0000000000..cc11d334c6 --- /dev/null +++ b/etc/thirdparty/dummy_dist/README.txt @@ -0,0 +1,24 @@ +Dummy Wheel Distributions for Apple Silicon (macOS ARM64) +========================================================= + +Overview +-------- +This directory provides **empty wheel distributions** designed as a workaround to +allow the installation of `ScanCode.io` on **Apple Silicon (macOS ARM64)** platforms. + +The issue arises because certain required packages, such as `extractcode-7z`, do not +offer pre-built wheels compatible with Apple Silicon. +Consequently, `pip` encounters dependency resolution errors during installation. + +Purpose +------- +The dummy wheels in this project serve as placeholders. These wheels: +- **Contain no functionality** and are completely empty. +- Allow `pip` to resolve dependencies correctly by tricking it into treating the + required package as already installed. + +Caution +------- +These dummy wheels **do not provide any actual functionality**. +They only exist to bypass `pip` dependency resolution issues and allow `ScanCode.io` +to be installed on Apple Silicon. diff --git a/etc/thirdparty/dummy_dist/extractcode_7z-16.5.210525-py3-none-macosx_11_0_arm64.whl b/etc/thirdparty/dummy_dist/extractcode_7z-16.5.210525-py3-none-macosx_11_0_arm64.whl new file mode 100644 index 0000000000..c18b64dea4 Binary files /dev/null and b/etc/thirdparty/dummy_dist/extractcode_7z-16.5.210525-py3-none-macosx_11_0_arm64.whl differ diff --git a/etc/thirdparty/dummy_dist/extractcode_libarchive-3.5.1.210525-py3-none-macosx_11_0_arm64.whl b/etc/thirdparty/dummy_dist/extractcode_libarchive-3.5.1.210525-py3-none-macosx_11_0_arm64.whl new file mode 100644 index 0000000000..b2c0869133 Binary files /dev/null and b/etc/thirdparty/dummy_dist/extractcode_libarchive-3.5.1.210525-py3-none-macosx_11_0_arm64.whl differ diff --git a/etc/thirdparty/dummy_dist/typecode_libmagic-5.39.210223-py3-none-macosx_11_0_arm64.whl b/etc/thirdparty/dummy_dist/typecode_libmagic-5.39.210223-py3-none-macosx_11_0_arm64.whl new file mode 100644 index 0000000000..3237d0df34 Binary files /dev/null and b/etc/thirdparty/dummy_dist/typecode_libmagic-5.39.210223-py3-none-macosx_11_0_arm64.whl differ