Skip to content

Commit

Permalink
Add version constraint to system_provided plugins #3967
Browse files Browse the repository at this point in the history
    * Update configure script

Signed-off-by: Jono Yang <jyang@nexb.com>
  • Loading branch information
JonoYang committed Oct 31, 2024
1 parent e0d9f94 commit 5cc2459
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
17 changes: 10 additions & 7 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -141,23 +141,26 @@ CLI_ARGS=$1
# Defaults. Change these variables to customize this script
################################

BASE=".[packages]"
BASE_DEV=".[packages,testing]"
BASE=".[packages"
BASE_DEV=".[packages,testing"
if [[ $OSTYPE == 'darwin'* ]]; then
BASE="."
BASE_DEV=".[testing]"
BASE=""
BASE_DEV=".[testing"
fi

# If SCANCODE_SYSTEM_PROVIDED is set, then we install system_provided extra_require
if [[ SCANCODE_SYSTEM_PROVIDED ]]; then
BASE=".[packages,system_provided]"
BASE_DEV=".[packages,testing,system_provided]"
if [[ $OSTYPE == 'darwin'* ]]; then
BASE=".[system_provided]"
BASE_DEV=".[testing,system_provided]"
else
BASE+=",system_provided"
fi
BASE_DEV+=",system_provided"
fi

BASE="$BASE]"
BASE_DEV="$BASE_DEV]"

# Requirement arguments passed to pip and used by default or with --dev.
REQUIREMENTS="--editable $BASE --constraint requirements.txt --constraint requirements-linux.txt"
DEV_REQUIREMENTS="--editable $BASE_DEV --constraint requirements.txt --constraint requirements-linux.txt --constraint requirements-dev.txt"
Expand Down
6 changes: 3 additions & 3 deletions setup-mini.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ packages =

# use 7zip, libarchive, and libmagic provided on the system
system_provided =
extractcode-7z-system-provided
extractcode-libarchive-system-provided
typecode-libmagic-system-provided
extractcode-7z-system-provided >= 33.0.0
extractcode-libarchive-system-provided >= 33.0.0
typecode-libmagic-system-provided >= 33.0.0

[options.entry_points]
console_scripts =
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ packages =

# use 7zip, libarchive, and libmagic provided on the system
system_provided =
extractcode-7z-system-provided
extractcode-libarchive-system-provided
typecode-libmagic-system-provided
extractcode-7z-system-provided >= 33.0.0
extractcode-libarchive-system-provided >= 33.0.0
typecode-libmagic-system-provided >= 33.0.0

[options.entry_points]
console_scripts =
Expand Down

0 comments on commit 5cc2459

Please sign in to comment.