File tree 2 files changed +16
-7
lines changed
2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ CLI_ARGS=$1
26
26
# ###############################
27
27
28
28
# 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 "
31
31
32
32
# where we create a virtualenv
33
33
VIRTUALENV_DIR=tmp
@@ -50,8 +50,12 @@ VIRTUALENV_PYZ_URL=https://bootstrap.pypa.io/virtualenv.pyz
50
50
CFG_ROOT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
51
51
CFG_BIN_DIR=$CFG_ROOT_DIR /$VIRTUALENV_DIR /bin
52
52
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
55
59
56
60
# ###############################
57
61
# Set the quiet flag to empty if not defined
Original file line number Diff line number Diff line change 24
24
@ rem ################################
25
25
26
26
@ 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 "
29
29
30
30
@ rem # where we create a virtualenv
31
31
set " VIRTUALENV_DIR = tmp"
@@ -49,7 +49,12 @@ set "CFG_BIN_DIR=%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts"
49
49
50
50
@ rem ################################
51
51
@ 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%
53
58
@ rem ################################
54
59
55
60
You can’t perform that action at this time.
0 commit comments