File tree 3 files changed +31
-20
lines changed 3 files changed +31
-20
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ Replace \<version\> with the version number of the Python being used.
81
81
To generate requirements-dev.txt after requirements.txt has been generated:
82
82
83
83
.. code-block :: bash
84
- ./configure --dev
84
+ ./configure --init -- dev
85
85
source venv/bin/activate
86
86
python etc/scripts/gen_requirements_dev.py -s venv/lib/python< version> /site-packages/
87
87
Original file line number Diff line number Diff line change @@ -164,12 +164,18 @@ CFG_DEV_MODE=0
164
164
CFG_REQUIREMENTS=$REQUIREMENTS
165
165
NO_INDEX=" --no-index"
166
166
167
- case " $CLI_ARGS " in
168
- --help) cli_help;;
169
- --clean) clean;;
170
- --dev) CFG_REQUIREMENTS=" $DEV_REQUIREMENTS " && CFG_DEV_MODE=1;;
171
- --init) NO_INDEX=" " ;;
172
- esac
167
+ # We are using getopts to parse option arguments that start with "-"
168
+ while getopts :-: optchar; do
169
+ case " ${optchar} " in
170
+ -)
171
+ case " ${OPTARG} " in
172
+ help ) cli_help;;
173
+ clean ) clean;;
174
+ dev ) CFG_REQUIREMENTS=" $DEV_REQUIREMENTS " && CFG_DEV_MODE=1;;
175
+ init ) NO_INDEX=" " ;;
176
+ esac ;;
177
+ esac
178
+ done
173
179
174
180
PIP_EXTRA_ARGS=" $PIP_EXTRA_ARGS $NO_INDEX "
175
181
Original file line number Diff line number Diff line change @@ -66,19 +66,24 @@ set CFG_DEV_MODE=0
66
66
set " CFG_REQUIREMENTS = %REQUIREMENTS% "
67
67
set " NO_INDEX = --no-index"
68
68
69
- if " %1 " EQU " --help" (goto cli_help)
70
- if " %1 " EQU " --clean" (goto clean)
71
- if " %1 " EQU " --dev" (
72
- set " CFG_REQUIREMENTS = %DEV_REQUIREMENTS% "
73
- set CFG_DEV_MODE = 1
74
- )
75
- if " %1 " EQU " --init" (
76
- set " NO_INDEX = "
77
- )
78
- if " %1 " EQU " --python" (
79
- echo " The --python option is now DEPRECATED. Use the PYTHON_EXECUTABLE environment"
80
- echo " variable instead. Run configure --help for details."
81
- exit /b 0
69
+ :again
70
+ if not " %1 " == " " (
71
+ if " %1 " EQU " --help" (goto cli_help)
72
+ if " %1 " EQU " --clean" (goto clean)
73
+ if " %1 " EQU " --dev" (
74
+ set " CFG_REQUIREMENTS = %DEV_REQUIREMENTS% "
75
+ set CFG_DEV_MODE = 1
76
+ )
77
+ if " %1 " EQU " --init" (
78
+ set " NO_INDEX = "
79
+ )
80
+ if " %1 " EQU " --python" (
81
+ echo " The --python option is now DEPRECATED. Use the PYTHON_EXECUTABLE environment"
82
+ echo " variable instead. Run configure --help for details."
83
+ exit /b 0
84
+ )
85
+ shift
86
+ goto again
82
87
)
83
88
84
89
set " PIP_EXTRA_ARGS = %PIP_EXTRA_ARGS% %NO_INDEX% "
You can’t perform that action at this time.
0 commit comments