|
15 | 15 | # head node. Then your FIREWHEEL cluster will be ready to use!
|
16 | 16 | #
|
17 | 17 | # Requirements:
|
18 |
| -# * Python >=3.7, with the path to its executable specified by PYTHON_BIN |
| 18 | +# * Python >=3.8, with the path to its executable specified by PYTHON_BIN |
19 | 19 | # (we recommend using virtual environments).
|
20 | 20 | # * minimega and discovery installed and configured.
|
21 | 21 |
|
@@ -223,47 +223,49 @@ function install_firewheel_generic() {
|
223 | 223 | # Arguments:
|
224 | 224 | # None
|
225 | 225 | # Globals:
|
226 |
| -# FIREWHEEL_ROOT |
| 226 | +# FIREWHEEL_ROOT_DIR |
227 | 227 | # PIP_ARGS
|
228 | 228 | # PYTHON_BIN
|
229 | 229 | #######################################
|
230 | 230 | function install_firewheel() {
|
231 |
| - pushd "${FIREWHEEL_ROOT_DIR}" |
232 |
| - ${PYTHON_BIN} -m pip install ${PIP_ARGS} firewheel |
233 |
| - if [ ! $? -eq 0 ]; |
234 |
| - then |
235 |
| - install_firewheel_generic |
236 |
| - ${PYTHON_BIN} -m pip install ${PIP_ARGS} --prefer-binary ./dist/firewheel-2.6.0.tar.gz |
| 231 | + local clone="$1" |
| 232 | + |
| 233 | + if [[ $clone -eq 0 ]]; then |
| 234 | + ${PYTHON_BIN} -m pip install ${PIP_ARGS} ${FIREWHEEL_ROOT_DIR}/[mcs] |
| 235 | + else |
| 236 | + ${PYTHON_BIN} -m pip install ${PIP_ARGS} ${FIREWHEEL_ROOT_DIR}/ |
| 237 | + ${PYTHON_BIN} -m pip install ${PIP_ARGS} ${MC_DIR}/firewheel_repo_base |
| 238 | + ${PYTHON_BIN} -m pip install ${PIP_ARGS} ${MC_DIR}/firewheel_repo_linux |
| 239 | + ${PYTHON_BIN} -m pip install ${PIP_ARGS} ${MC_DIR}/firewheel_repo_vyos |
237 | 240 | fi
|
238 |
| - popd |
239 | 241 | }
|
240 | 242 |
|
241 | 243 | #######################################
|
242 | 244 | # Installing the FIREWHEEL package with development dependencies.
|
243 | 245 | # Arguments:
|
244 | 246 | # None
|
245 | 247 | # Globals:
|
246 |
| -# FIREWHEEL_ROOT |
| 248 | +# FIREWHEEL_ROOT_DIR |
247 | 249 | # PIP_ARGS
|
248 | 250 | # PYTHON_BIN
|
249 | 251 | #######################################
|
250 | 252 | function install_firewheel_development() {
|
251 |
| - pushd "${FIREWHEEL_ROOT_DIR}" |
| 253 | + local clone="$1" |
252 | 254 | install_firewheel_generic
|
253 | 255 |
|
254 | 256 | # Install the development version.
|
255 |
| - if [[ $1 -eq 1 ]]; then |
256 |
| - then |
| 257 | + if [[ $clone -eq 0 ]]; then |
| 258 | + ${PYTHON_BIN} -m pip install ${PIP_ARGS} -e ${FIREWHEEL_ROOT_DIR}/[dev] |
| 259 | + else |
257 | 260 | # In this case, we do not use the "dev" optional dependencies as
|
258 | 261 | # the user is using the source code version of these model components, rather
|
259 | 262 | # than the Python package installed repositories.
|
260 | 263 | ${PYTHON_BIN} -m pip install ${PIP_ARGS} pre-commit tox
|
261 |
| - ${PYTHON_BIN} -m pip install ${PIP_ARGS} -e .[format,docs] |
262 |
| - |
263 |
| - else |
264 |
| - ${PYTHON_BIN} -m pip install ${PIP_ARGS} -e .[dev] |
| 264 | + ${PYTHON_BIN} -m pip install ${PIP_ARGS} -e ${FIREWHEEL_ROOT_DIR}/[format,docs] |
| 265 | + ${PYTHON_BIN} -m pip install ${PIP_ARGS} -e ${MC_DIR}/firewheel_repo_base |
| 266 | + ${PYTHON_BIN} -m pip install ${PIP_ARGS} -e ${MC_DIR}/firewheel_repo_linux |
| 267 | + ${PYTHON_BIN} -m pip install ${PIP_ARGS} -e ${MC_DIR}/firewheel_repo_vyos |
265 | 268 | fi
|
266 |
| - popd |
267 | 269 | }
|
268 | 270 |
|
269 | 271 | #######################################
|
@@ -386,8 +388,8 @@ function main() {
|
386 | 388 | echo "${fw_str} Installing FIREWHEEL in development mode."
|
387 | 389 | install_firewheel_development $clone
|
388 | 390 | else
|
389 |
| - echo "${fw_str} Installing FIREWHEEL without development dependencies." |
390 |
| - install_firewheel |
| 391 | + echo "${fw_str} Installing FIREWHEEL with standard (non-development) dependencies." |
| 392 | + install_firewheel $clone |
391 | 393 | fi
|
392 | 394 | echo "${fw_str} Setting configuration options."
|
393 | 395 | init_firewheel $static
|
|
0 commit comments