Skip to content

Commit f0d5a29

Browse files
committed
Correct configure scripts
These were no longer working Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 03d4799 commit f0d5a29

File tree

2 files changed

+25
-33
lines changed

2 files changed

+25
-33
lines changed

configure

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -67,34 +67,6 @@ if [[ "$CFG_QUIET" == "" ]]; then
6767
fi
6868

6969

70-
################################
71-
# Main command line entry point
72-
main() {
73-
CFG_REQUIREMENTS=$REQUIREMENTS
74-
NO_INDEX="--no-index"
75-
76-
# We are using getopts to parse option arguments that start with "-"
77-
while getopts :-: optchar; do
78-
case "${optchar}" in
79-
-)
80-
case "${OPTARG}" in
81-
help ) cli_help;;
82-
clean ) find_python && clean;;
83-
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";;
84-
init ) NO_INDEX="";;
85-
esac;;
86-
esac
87-
done
88-
89-
PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS $NO_INDEX"
90-
91-
find_python
92-
create_virtualenv "$VIRTUALENV_DIR"
93-
install_packages "$CFG_REQUIREMENTS"
94-
. "$CFG_BIN_DIR/activate"
95-
}
96-
97-
9870
################################
9971
# Find a proper Python to run
10072
# Use environment variables or a file if available.
@@ -197,6 +169,29 @@ clean() {
197169
}
198170

199171

200-
main
172+
################################
173+
# Main command line entry point
174+
CFG_REQUIREMENTS=$REQUIREMENTS
175+
176+
# We are using getopts to parse option arguments that start with "-"
177+
while getopts :-: optchar; do
178+
case "${optchar}" in
179+
-)
180+
case "${OPTARG}" in
181+
help ) cli_help;;
182+
clean ) find_python && clean;;
183+
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";;
184+
init ) ;;
185+
esac;;
186+
esac
187+
done
188+
189+
PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS"
190+
191+
find_python
192+
create_virtualenv "$VIRTUALENV_DIR"
193+
install_packages "$CFG_REQUIREMENTS"
194+
. "$CFG_BIN_DIR/activate"
195+
201196

202197
set +e

configure.bat

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,11 @@ if not "%1" == "" (
7777
if "%1" EQU "--dev" (
7878
set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%"
7979
)
80-
if "%1" EQU "--init" (
81-
set "NO_INDEX= "
82-
)
8380
shift
8481
goto again
8582
)
8683

87-
set "PIP_EXTRA_ARGS=%PIP_EXTRA_ARGS% %NO_INDEX%"
84+
set "PIP_EXTRA_ARGS=%PIP_EXTRA_ARGS%"
8885

8986

9087
@rem ################################

0 commit comments

Comments
 (0)