Skip to content

Commit

Permalink
Add docs option in configure
Browse files Browse the repository at this point in the history
Adds a --docs option to the configure script to also install requirements
for the documentation builds.

Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
  • Loading branch information
AyanSinhaMahapatra committed Mar 24, 2022
1 parent c76dff4 commit eb57889
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ CLI_ARGS=$1
# Requirement arguments passed to pip and used by default or with --dev.
REQUIREMENTS="--editable . --constraint requirements.txt"
DEV_REQUIREMENTS="--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
DOCS_REQUIREMENTS="--editable .[docs] --constraint requirements.txt"

# where we create a virtualenv
VIRTUALENV_DIR=venv
Expand Down Expand Up @@ -177,6 +178,7 @@ while getopts :-: optchar; do
help ) cli_help;;
clean ) find_python && clean;;
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";;
docs ) CFG_REQUIREMENTS="$DOCS_REQUIREMENTS";;
esac;;
esac
done
Expand Down
4 changes: 4 additions & 0 deletions configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
@rem # Requirement arguments passed to pip and used by default or with --dev.
set "REQUIREMENTS=--editable . --constraint requirements.txt"
set "DEV_REQUIREMENTS=--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
set "DOCS_REQUIREMENTS=--editable .[docs] --constraint requirements.txt"

@rem # where we create a virtualenv
set "VIRTUALENV_DIR=venv"
Expand Down Expand Up @@ -77,6 +78,9 @@ if not "%1" == "" (
if "%1" EQU "--dev" (
set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%"
)
if "%1" EQU "--docs" (
set "CFG_REQUIREMENTS=%DOCS_REQUIREMENTS%"
)
shift
goto again
)
Expand Down

0 comments on commit eb57889

Please sign in to comment.