@@ -49,11 +49,6 @@ set "CFG_BIN_DIR=%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts"
4949
5050@ rem ################################
5151@ 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- )
5752set " PIP_EXTRA_ARGS = --find-links %CFG_ROOT_DIR% \thirdparty --find-links https://thirdparty.aboutcode.org/pypi" & %INDEX_ARG%
5853@ rem ################################
5954
@@ -69,19 +64,26 @@ if not defined CFG_QUIET (
6964@ rem # Main command line entry point
7065set CFG_DEV_MODE = 0
7166set " CFG_REQUIREMENTS = %REQUIREMENTS% "
67+ set " NO_INDEX = --no-index"
7268
7369if " %1 " EQU " --help" (goto cli_help)
7470if " %1 " EQU " --clean" (goto clean)
7571if " %1 " EQU " --dev" (
7672 set " CFG_REQUIREMENTS = %DEV_REQUIREMENTS% "
7773 set CFG_DEV_MODE = 1
7874)
75+ if " %1 " EQU " --init" (
76+ set " NO_INDEX = "
77+ )
7978if " %1 " EQU " --python" (
8079 echo " The --python option is now DEPRECATED. Use the PYTHON_EXECUTABLE environment"
8180 echo " variable instead. Run configure --help for details."
8281 exit /b 0
8382)
8483
84+ set " PIP_EXTRA_ARGS = %PIP_EXTRA_ARGS% %NO_INDEX% "
85+
86+
8587@ rem ################################
8688@ rem # find a proper Python to run
8789@ rem # Use environment variables or a file if available.
@@ -170,10 +172,14 @@ exit /b 0
170172 echo " usage: configure [options]"
171173 echo " "
172174 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.
173178 echo " "
174179 echo The options are:
175180 echo " --clean: clean built and installed files and exit."
176181 echo " --dev: configure the environment for development."
182+ echo " --init: pull dependencies from PyPI. Used when first setting up a project."
177183 echo " --help: display this help message and exit."
178184 echo " "
179185 echo By default, the python interpreter version found in the path is used.
0 commit comments