Skip to content

Commit 9acab17

Browse files
committed
Improve detection of thirdparty dir
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent c1f70fc commit 9acab17

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

configure

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,19 @@ CFG_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5252
CFG_BIN_DIR=$CFG_ROOT_DIR/$VIRTUALENV_DIR/bin
5353

5454

55+
################################
56+
# Install with or without and index. With "--no-index" this is using only local wheels
57+
# This is an offline mode with no index and no network operations
58+
# NO_INDEX="--no-index "
59+
NO_INDEX=""
60+
61+
5562
################################
5663
# Thirdparty package locations and index handling
57-
# Find packages from the local thirdparty directory
58-
if [ -d "$CFG_ROOT_DIR/thirdparty" ]; then
59-
PIP_EXTRA_ARGS="--find-links $CFG_ROOT_DIR/thirdparty"
64+
# Find packages from the local thirdparty directory if present
65+
THIRDPARDIR=$CFG_ROOT_DIR/thirdparty
66+
if [[ "$(echo $THIRDPARDIR/*.whl)x" != "$THIRDPARDIR/*.whlx" ]]; then
67+
PIP_EXTRA_ARGS="$NO_INDEX --find-links $THIRDPARDIR"
6068
fi
6169

6270

@@ -182,6 +190,7 @@ while getopts :-: optchar; do
182190
esac
183191
done
184192

193+
185194
PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS"
186195

187196
find_python

0 commit comments

Comments
 (0)