File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ CLI_ARGS=$1
2626# ###############################
2727
2828# Requirement arguments passed to pip and used by default or with --dev.
29- REQUIREMENTS=" --editable ."
30- DEV_REQUIREMENTS=" --editable .[testing]"
29+ REQUIREMENTS=" --editable . --constraint requirements.txt "
30+ DEV_REQUIREMENTS=" --editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt "
3131
3232# where we create a virtualenv
3333VIRTUALENV_DIR=tmp
@@ -50,8 +50,12 @@ VIRTUALENV_PYZ_URL=https://bootstrap.pypa.io/virtualenv.pyz
5050CFG_ROOT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
5151CFG_BIN_DIR=$CFG_ROOT_DIR /$VIRTUALENV_DIR /bin
5252
53- # Find packages from the local thirdparty directory or from pypi
54- PIP_EXTRA_ARGS=" --find-links $CFG_ROOT_DIR /thirdparty"
53+ # Find packages from the local thirdparty directory or from thirdparty.aboutcode.org
54+ PIP_EXTRA_ARGS=" --find-links $CFG_ROOT_DIR /thirdparty --find-links https://thirdparty.aboutcode.org/pypi"
55+
56+ if [[ -f " $CFG_ROOT_DIR /requirements.txt" ]] && [[ -f " $CFG_ROOT_DIR /requirements-dev.txt" ]]; then
57+ PIP_EXTRA_ARGS+=" --no-index"
58+ fi
5559
5660# ###############################
5761# Set the quiet flag to empty if not defined
Original file line number Diff line number Diff line change 2424@ rem ################################
2525
2626@ rem # Requirement arguments passed to pip and used by default or with --dev.
27- set " REQUIREMENTS = --editable ."
28- set " DEV_REQUIREMENTS = --editable .[testing]"
27+ set " REQUIREMENTS = --editable . --constraint requirements.txt "
28+ set " DEV_REQUIREMENTS = --editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt "
2929
3030@ rem # where we create a virtualenv
3131set " VIRTUALENV_DIR = tmp"
@@ -49,7 +49,12 @@ set "CFG_BIN_DIR=%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts"
4949
5050@ rem ################################
5151@ rem # Thirdparty package locations and index handling
52- set " PIP_EXTRA_ARGS = --find-links %CFG_ROOT_DIR% \thirdparty"
52+ if exist " " %CFG_ROOT_DIR% \requirements.txt" " if exist " " %CFG_ROOT_DIR% \requirements-dev.txt" " (
53+ set " INDEX_ARG = --no-index"
54+ ) else (
55+ set " INDEX_ARG = "
56+ )
57+ set " PIP_EXTRA_ARGS = --find-links %CFG_ROOT_DIR% \thirdparty --find-links https://thirdparty.aboutcode.org/pypi" & %INDEX_ARG%
5358@ rem ################################
5459
5560
You can’t perform that action at this time.
0 commit comments