This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 68c7d836f46 [MINOR][PYTHON][DOC] Fixed instructions for building python docs 68c7d836f46 is described below commit 68c7d836f461c47b59a69d3faa8cb44cca5fb741 Author: William Zijie <peterzi...@gmail.com> AuthorDate: Tue Jul 5 08:47:10 2022 +0900 [MINOR][PYTHON][DOC] Fixed instructions for building python docs Adding python packages to README and requirements.txt to fix issues with building python documentation There are currently two ways to install python packages for building python documentation: 1. running sudo pip install from the README.md ```sh $ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive 'jinja2<3.0.0' ``` 2. running the requirements.txt file, from $SPARK_HOME ```sh pip install -r dev/requirements.txt ``` ### What changes were proposed in this pull request? 1. Adding 'markupsafe==2.0.1' to both /docs/README.md and /dev/requirements.txt 2. Syncing both files to contain the same packages 3. Adding pyarrow to /docs/README.md ### Why are the changes needed? 1. markupsafe==2.1.1 would run into errors when building python documentation (using 'make html') ![image](https://user-images.githubusercontent.com/89562186/177061721-4caca44e-1b39-4458-906e-9669c426fc68.png) [Similar stack overflow issue](https://stackoverflow.com/questions/72191560/importerror-cannot-import-name-soft-unicode-from-markupsafe) Downgrading to markupsafe==2.0.1 fixes missing 'soft_unicode' module issues 2. Adding missing packages from requirements.txt (Under Documentation-Python) to README.md, this fixes some additional bugs when trying to build docs from the README command. 3. Finally, running the README command runs into one last error: ![image](https://user-images.githubusercontent.com/89562186/177062155-0e6432c1-16be-4edd-8430-737376828a6a.png) This is because 'pyarrow' module has been added to requirements.txt (Under PySpark Optional Dependencies) but is still missing from the README command ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Documentation changes only. Closes #37066 from Transurgeon/master. Lead-authored-by: William Zijie <peterzi...@gmail.com> Co-authored-by: William Zijie Zhang <89562186+transurg...@users.noreply.github.com> Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> --- dev/requirements.txt | 2 ++ docs/README.md | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/requirements.txt b/dev/requirements.txt index e7e0a4b4274..c25b5dd9fb3 100644 --- a/dev/requirements.txt +++ b/dev/requirements.txt @@ -36,6 +36,8 @@ jinja2<3.0.0 sphinx<3.1.0 sphinx-plotly-directive docutils<0.18.0 +# See SPARK-38279. +markupsafe==2.0.1 # Development scripts jira diff --git a/docs/README.md b/docs/README.md index 6bb83d89530..27238964f0a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -59,9 +59,9 @@ See also https://github.com/sphinx-doc/sphinx/issues/7551. TODO(SPARK-35375): Jinja2 3.0.0+ causes error when building with Sphinx. See also https://issues.apache.org/jira/browse/SPARK-35375. --> - +Run the following command from $SPARK_HOME: ```sh -$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive 'jinja2<3.0.0' +$ sudo pip install -r dev/requirements.txt ``` ### R API Documentation (Optional) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org