File tree Expand file tree Collapse file tree 3 files changed +32
-21
lines changed
Expand file tree Collapse file tree 3 files changed +32
-21
lines changed Original file line number Diff line number Diff line change @@ -76,12 +76,12 @@ To generate requirements.txt:
7676
7777 python etc/scripts/gen_requirements.py -s venv/lib/python< version> /site-packages/
7878
79- Replace \< version\> with the version number of the Python being used.
79+ Replace \< version\> with the version number of the Python being used, for example: `` venv/lib/python3.6/site-packages/ ``
8080
8181To generate requirements-dev.txt after requirements.txt has been generated:
8282
8383.. code-block :: bash
84- ./configure --dev
84+ ./configure --init -- dev
8585 source venv/bin/activate
8686 python etc/scripts/gen_requirements_dev.py -s venv/lib/python< version> /site-packages/
8787
Original file line number Diff line number Diff line change @@ -164,12 +164,18 @@ CFG_DEV_MODE=0
164164CFG_REQUIREMENTS=$REQUIREMENTS
165165NO_INDEX=" --no-index"
166166
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
173179
174180PIP_EXTRA_ARGS=" $PIP_EXTRA_ARGS $NO_INDEX "
175181
Original file line number Diff line number Diff line change @@ -66,19 +66,24 @@ set CFG_DEV_MODE=0
6666set " CFG_REQUIREMENTS = %REQUIREMENTS% "
6767set " NO_INDEX = --no-index"
6868
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
8287)
8388
8489set " PIP_EXTRA_ARGS = %PIP_EXTRA_ARGS% %NO_INDEX% "
You can’t perform that action at this time.
0 commit comments