File tree Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ CLI_ARGS=$1
3030# Requirement arguments passed to pip and used by default or with --dev.
3131REQUIREMENTS=" --editable . --constraint requirements.txt"
3232DEV_REQUIREMENTS=" --editable .[testing,packages] --constraint requirements.txt --constraint requirements-dev.txt"
33+ DOCS_REQUIREMENTS=" --editable .[docs] --constraint requirements.txt"
3334
3435# where we create a virtualenv
3536VIRTUALENV_DIR=venv
@@ -178,6 +179,7 @@ while getopts :-: optchar; do
178179 help ) cli_help;;
179180 clean ) find_python && clean;;
180181 dev ) CFG_REQUIREMENTS=" $DEV_REQUIREMENTS " ;;
182+ docs ) CFG_REQUIREMENTS=" $DOCS_REQUIREMENTS " ;;
181183 esac ;;
182184 esac
183185done
Original file line number Diff line number Diff line change 2828@ rem # Requirement arguments passed to pip and used by default or with --dev.
2929set " REQUIREMENTS = --editable . --constraint requirements.txt"
3030set " DEV_REQUIREMENTS = --editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
31+ set " DOCS_REQUIREMENTS = --editable .[docs] --constraint requirements.txt"
3132
3233@ rem # where we create a virtualenv
3334set " VIRTUALENV_DIR = venv"
@@ -78,6 +79,9 @@ if not "%1" == "" (
7879 if " %1 " EQU " --dev" (
7980 set " CFG_REQUIREMENTS = %DEV_REQUIREMENTS% "
8081 )
82+ if " %1 " EQU " --docs" (
83+ set " CFG_REQUIREMENTS = %DOCS_REQUIREMENTS% "
84+ )
8185 shift
8286 goto again
8387)
Original file line number Diff line number Diff line change @@ -18,23 +18,23 @@ That will create an ``/scancode-toolkit`` directory in your working directory.
1818Now you can install the dependencies in a virtualenv::
1919
2020 cd scancode-toolkit
21- ./configure --dev
22- source venv/bin/activate
21+ ./configure --docs
22+
23+ .. note ::
24+
25+ In case of windows, run ``configure --docs `` instead of this.
2326
24- Now, the following prerequisites should be installed
27+ Now, this will install the following prerequisites:
2528
2629- Sphinx
2730- sphinx_rtd_theme (the format theme used by ReadTheDocs)
2831- docs8 (style linter)
2932
30- ::
31-
32- pip install -e .[docs]
33-
34- These requirements are already present in setup.cfg and this installs them.
33+ These requirements are already present in setup.cfg and `./configure --docs ` installs them.
3534
3635Now you can build the HTML documents locally::
3736
37+ source venv/bin/activate
3838 cd docs
3939 make html
4040
@@ -116,9 +116,10 @@ Style Checks Using ``Doc8``
116116How To Run Style Tests
117117^^^^^^^^^^^^^^^^^^^^^^
118118
119- In the project root, run the following command ::
119+ In the project root, run the following commands ::
120120
121- $ doc8 --max-line-length 100 docs/source/ --ignore D000
121+ $ cd docs
122+ $ ./scripts/doc8_style_check.sh
122123
123124A sample output is::
124125
You can’t perform that action at this time.
0 commit comments