diff --git a/.gitignore b/.gitignore index d3c65257..ce9ec15f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,6 @@ source/_build # ignore artifacts generated by running make py cloned_repo bundles.html.txt + +# ignore the venv, used for running make py +venv diff --git a/.travis.yml b/.travis.yml index b3daf423..b1e0cc6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,12 +4,11 @@ python: - "3.6" # command to install dependencies -install: +install: - pip3 install -q -r requirements.txt - - pip3 install -q -r source/_scripts/_python/requirements.txt # command to run tests -script: +script: - make py - make htmlall @@ -52,4 +51,4 @@ deploy: after_deploy: - wget $PUBLISH_URL - - cat clearlinux-latest \ No newline at end of file + - cat clearlinux-latest diff --git a/Makefile b/Makefile index 1490067a..cc811a48 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ # Makefile for Sphinx documentation -# + +SHELL := /bin/bash + +PY_VERSION ?= 3.6 all: make -C source html @@ -28,4 +31,10 @@ help: clean: make -C source clean + rm -rf venv + +venv: + virtualenv -p python$(PY_VERSION) venv; + source venv/bin/activate; \ + pip3 install -r requirements.txt; diff --git a/requirements.txt b/requirements.txt index 1f85193e..81f1334a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,6 @@ sphinx==1.8 docutils==0.14 sphinx_rtd_theme sphinx-intl==2.0.0 -sphinx-sitemap==1.0.2 \ No newline at end of file +sphinx-sitemap==1.0.2 +Jinja2==2.10.1 +GitPython==2.1.11 diff --git a/source/Makefile b/source/Makefile index 444ea7fe..8be0a724 100644 --- a/source/Makefile +++ b/source/Makefile @@ -53,8 +53,9 @@ help: clean: rm -rf $(BUILDDIR)/* + rm -rf reference/bundles/*.txt -htmlall: +htmlall: $(SPHINXBUILD) -b html $(ERROROPTS) $(ALLSPHINXOPTS) $(BUILDDIR)/html $(SPHINXBUILD) -b html $(ERROROPTS) -D language='zh_CN' $(ALLSPHINXOPTS) $(BUILDDIR)/zh_CN diff --git a/source/_scripts/_python/Makefile b/source/_scripts/_python/Makefile index 0b6c6d7b..a0775a93 100644 --- a/source/_scripts/_python/Makefile +++ b/source/_scripts/_python/Makefile @@ -1,9 +1,6 @@ - py: - python bundle_lister.py + python3 bundle_lister.py cp bundles.html.txt ../../reference/bundles - rm -rf bundle_lister/cloned_repo/* + rm -rf ./cloned_repo/* rm bundles.html.txt @echo "Python script finished successfully!" - - diff --git a/source/_scripts/_python/requirements.txt b/source/_scripts/_python/requirements.txt deleted file mode 100644 index 2dd97533..00000000 --- a/source/_scripts/_python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -Jinja2==2.10.1 -GitPython==2.1.11 diff --git a/source/conf.py b/source/conf.py index 839060b7..8893d0e6 100644 --- a/source/conf.py +++ b/source/conf.py @@ -330,4 +330,5 @@ texinfo_documents = [ locale_dirs = ['../locale/'] # path for lang-specific po files. gettext_compact = False # optional. -html_baseurl = 'https://docs.01.org/clearlinux/' \ No newline at end of file +html_baseurl = 'https://docs.01.org/clearlinux/' +