@@ -49,11 +49,6 @@ 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
- 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
52
set " PIP_EXTRA_ARGS = --find-links %CFG_ROOT_DIR% \thirdparty --find-links https://thirdparty.aboutcode.org/pypi" & %INDEX_ARG%
58
53
@ rem ################################
59
54
@@ -69,19 +64,26 @@ if not defined CFG_QUIET (
69
64
@ rem # Main command line entry point
70
65
set CFG_DEV_MODE = 0
71
66
set " CFG_REQUIREMENTS = %REQUIREMENTS% "
67
+ set " NO_INDEX = --no-index"
72
68
73
69
if " %1 " EQU " --help" (goto cli_help)
74
70
if " %1 " EQU " --clean" (goto clean)
75
71
if " %1 " EQU " --dev" (
76
72
set " CFG_REQUIREMENTS = %DEV_REQUIREMENTS% "
77
73
set CFG_DEV_MODE = 1
78
74
)
75
+ if " %1 " EQU " --init" (
76
+ set " NO_INDEX = "
77
+ )
79
78
if " %1 " EQU " --python" (
80
79
echo " The --python option is now DEPRECATED. Use the PYTHON_EXECUTABLE environment"
81
80
echo " variable instead. Run configure --help for details."
82
81
exit /b 0
83
82
)
84
83
84
+ set " PIP_EXTRA_ARGS = %PIP_EXTRA_ARGS% %NO_INDEX% "
85
+
86
+
85
87
@ rem ################################
86
88
@ rem # find a proper Python to run
87
89
@ rem # Use environment variables or a file if available.
@@ -170,10 +172,14 @@ exit /b 0
170
172
echo " usage: configure [options]"
171
173
echo " "
172
174
echo The default is to configure for regular use. Use --dev for development.
175
+ echo Use the --init option if starting a new project and the project
176
+ echo dependencies are not available on thirdparty.aboutcode.org/pypi/
177
+ echo and requirements.txt and/or requirements-dev.txt has not been generated.
173
178
echo " "
174
179
echo The options are:
175
180
echo " --clean: clean built and installed files and exit."
176
181
echo " --dev: configure the environment for development."
182
+ echo " --init: pull dependencies from PyPI. Used when first setting up a project."
177
183
echo " --help: display this help message and exit."
178
184
echo " "
179
185
echo By default, the python interpreter version found in the path is used.
0 commit comments