Skip to content

Commit 17bd8e0

Browse files
committed
Add system_provided extra_require #3967
* Update configure script Signed-off-by: Jono Yang <[email protected]>
1 parent 6e42937 commit 17bd8e0

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

configure

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ CFG_ROOT_DIR="$( cd "$( dirname "${CFG_BIN}" )" && pwd )"
118118

119119
CFG_BIN_DIR=$CFG_ROOT_DIR/$VIRTUALENV_DIR/bin
120120

121-
# force relaunching under X86-64 architecture on macOS M1/ARM
121+
# force relaunching under X86-64 architecture on macOS M1/ARM
122122
if [[ $OSTYPE == 'darwin'* && $(uname -m) == 'arm64' && $(sysctl -in sysctl.proc_translated) == 0 ]]; then
123123
arch -x86_64 /bin/bash -c "$CFG_ROOT_DIR/configure $*"
124124
exit $?
@@ -148,6 +148,16 @@ if [[ $OSTYPE == 'darwin'* ]]; then
148148
BASE_DEV=".[testing]"
149149
fi
150150

151+
# If SCANCODE_SYSTEM_PROVIDED is set, then we install system_provided extra_require
152+
if [[ SCANCODE_SYSTEM_PROVIDED ]]; then
153+
BASE=".[packages,system_provided]"
154+
BASE_DEV=".[packages,testing,system_provided]"
155+
if [[ $OSTYPE == 'darwin'* ]]; then
156+
BASE=".[system_provided]"
157+
BASE_DEV=".[testing,system_provided]"
158+
fi
159+
fi
160+
151161
# Requirement arguments passed to pip and used by default or with --dev.
152162
REQUIREMENTS="--editable $BASE --constraint requirements.txt --constraint requirements-linux.txt"
153163
DEV_REQUIREMENTS="--editable $BASE_DEV --constraint requirements.txt --constraint requirements-linux.txt --constraint requirements-dev.txt"

setup-mini.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ packages =
151151
packagedcode_msitools >= 0.101.210706; platform_system == 'Linux'
152152
go-inspector >= 0.3.1; platform_system == 'Linux'
153153

154+
# use 7zip, libarchive, and libmagic provided on the system
155+
system_provided =
156+
extractcode-7z-system-provided
157+
extractcode-libarchive-system-provided
158+
typecode-libmagic-system-provided
154159

155160
[options.entry_points]
156161
console_scripts =

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ packages =
151151
packagedcode_msitools >= 0.101.210706; platform_system == 'Linux'
152152
go-inspector >= 0.3.1; platform_system == 'Linux'
153153

154+
# use 7zip, libarchive, and libmagic provided on the system
155+
system_provided =
156+
extractcode-7z-system-provided
157+
extractcode-libarchive-system-provided
158+
typecode-libmagic-system-provided
154159

155160
[options.entry_points]
156161
console_scripts =

0 commit comments

Comments
 (0)