Skip to content

Commit d1e1dcd

Browse files
Use dummy wheels for apple silicon
Reference: aboutcode-org/scancode.io#1646 Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
1 parent ea3ecab commit d1e1dcd

7 files changed

+33
-3
lines changed

.github/workflows/scancode-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ jobs:
284284
done
285285
for f in `find dist -type f -name "scancode_toolkit_mini-*.whl"`; \
286286
do \
287-
venv/bin/python -m pip install --force-reinstall "$f[full]" ; \
287+
venv/bin/python -m pip install --find-links=./etc/thirdparty/dummy_dist --force-reinstall "$f[full]" ; \
288288
venv/bin/scancode -clipeu --json-pp - some.file ; \
289289
done
290290

configure

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,15 @@ CLI_ARGS=$1
141141
# Defaults. Change these variables to customize this script
142142
################################
143143

144+
# extra arguments passed to pip
145+
PIP_EXTRA_ARGS=" "
146+
144147
BASE=".[packages]"
145148
BASE_DEV=".[packages,dev]"
146149
if [[ $OSTYPE == 'darwin'* ]]; then
147150
BASE="."
148151
BASE_DEV=".[dev]"
152+
PIP_EXTRA_ARGS="--find-links=./etc/thirdparty/dummy_dist"
149153
fi
150154

151155
# Requirement arguments passed to pip and used by default or with --dev.
@@ -160,8 +164,6 @@ VIRTUALENV_DIR=venv
160164
# Cleanable files and directories to delete with the --clean option
161165
CLEANABLE="build dist venv .cache .eggs *.egg-info docs/_build/ pip-selfcheck.json"
162166

163-
# extra arguments passed to pip
164-
PIP_EXTRA_ARGS=" "
165167

166168
# the URL to download virtualenv.pyz if needed
167169
VIRTUALENV_PYZ_URL=https://bootstrap.pypa.io/virtualenv.pyz

etc/release/scancode-create-release-app-macos.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ cp -r \
8080
dist/licensedcode_index*.whl \
8181
$release_dir/thirdparty
8282

83+
cp -r \
84+
etc/thirdparty/dummy_dist/*.whl \
85+
$release_dir/thirdparty
86+
8387
tarball=scancode-toolkit-$(git describe --tags)_py$python_dot_version-$operating_system.tar.gz
8488
mkdir -p release
8589
tar -cvzf release/$tarball $release_dir
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Dummy Wheel Distributions for Apple Silicon (macOS ARM64)
2+
=========================================================
3+
4+
Overview
5+
--------
6+
This directory provides **empty wheel distributions** designed as a workaround to
7+
allow the installation of `scancode-toolkit` on **Apple Silicon (macOS ARM64)** platforms.
8+
9+
The issue arises because certain required packages, such as `extractcode-7z`, do not
10+
offer pre-built wheels compatible with Apple Silicon.
11+
Consequently, `pip` encounters dependency resolution errors during installation.
12+
13+
Purpose
14+
-------
15+
The dummy wheels in this project serve as placeholders. These wheels:
16+
- **Contain no functionality** and are completely empty.
17+
- Allow `pip` to resolve dependencies correctly by tricking it into treating the
18+
required package as already installed.
19+
20+
Caution
21+
-------
22+
These dummy wheels **do not provide any actual functionality**.
23+
They only exist to bypass `pip` dependency resolution issues and allow
24+
`scancode-toolkit` to be installed on Apple Silicon.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)