From 77ce5e4068eaa64b876ca267d09e1689fe67ae8f Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Mon, 30 Aug 2021 17:40:27 -0700 Subject: [PATCH] Check for deps in local thirdparty directory #31 Signed-off-by: Jono Yang --- configure | 8 +++++--- configure.bat | 6 ++++++ thirdparty/README.rst | 2 ++ 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 thirdparty/README.rst diff --git a/configure b/configure index 25ab0ce..99bdf57 100755 --- a/configure +++ b/configure @@ -11,7 +11,7 @@ set -e #set -x ################################ -# A configuration script to set things up: +# A configuration script to set things up: # create a virtualenv and install or update thirdparty packages. # Source this script for initial configuration # Use configure --help for details @@ -50,9 +50,11 @@ VIRTUALENV_PYZ_URL=https://bootstrap.pypa.io/virtualenv.pyz CFG_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" CFG_BIN_DIR=$CFG_ROOT_DIR/$VIRTUALENV_DIR/bin +# Find packages from the local thirdparty directory or from pypi +PIP_EXTRA_ARGS="--find-links $CFG_ROOT_DIR/thirdparty" ################################ -# Set the quiet flag to empty if not defined +# Set the quiet flag to empty if not defined if [[ "$CFG_QUIET" == "" ]]; then CFG_QUIET=" " fi @@ -63,7 +65,7 @@ fi # Use environment variables or a file if available. # Otherwise the latest Python by default. if [[ "$PYTHON_EXECUTABLE" == "" ]]; then - # check for a file named PYTHON_EXECUTABLE + # check for a file named PYTHON_EXECUTABLE if [ -f "$CFG_ROOT_DIR/PYTHON_EXECUTABLE" ]; then PYTHON_EXECUTABLE=$(cat "$CFG_ROOT_DIR/PYTHON_EXECUTABLE") else diff --git a/configure.bat b/configure.bat index bafa126..be8f579 100644 --- a/configure.bat +++ b/configure.bat @@ -47,6 +47,12 @@ set CFG_ROOT_DIR=%~dp0 set "CFG_BIN_DIR=%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts" +@rem ################################ +@rem # Thirdparty package locations and index handling +set "PIP_EXTRA_ARGS=--find-links %CFG_ROOT_DIR%\thirdparty" +@rem ################################ + + @rem ################################ @rem # Set the quiet flag to empty if not defined if not defined CFG_QUIET ( diff --git a/thirdparty/README.rst b/thirdparty/README.rst new file mode 100644 index 0000000..b31482f --- /dev/null +++ b/thirdparty/README.rst @@ -0,0 +1,2 @@ +Put your Python dependency wheels to be vendored in this directory. +